User guide

Formatting a Report
Developing an ENFORM Query
058058 Tandem Computers Incorporated 3–41
Printing Information
Within a Report
Adding information such as titles, subtitles, and footings to a report improves the
appearance of the report and provides documentation as to the time, date, and reason
for the report. ENFORM provides statements and clauses that allow you to add
information:
At the beginning or end of a report.
Within the body of a report.
At the end of every report page.
At the beginning of every report page.
Table 3-6 shows the ENFORM statements and clauses that can be used to add
information to a report.
Table 3-6. Statements and Clauses Used to Add Information to Reports
Statement Clause Function
AFTER CHANGE Prints information preceding the records for each
by-item.
AT END AT END PRINT Prints information at the end of a report.
AT START AT START PRINT Prints information at the beginning of a report.
BEFORE CHANGE Prints information following the records for each by-item.
FOOTING FOOTING Prints a footing at the bottom of each page.
SUBFOOTING SUBFOOTING Prints a subfooting at the bottom of the page preceding
the footing.
SUBTITLE SUBTITLE Prints a subtitle at the top of the page following the title.
TITLE TITLE Prints a title at the top of a report page.
The statements and clauses used to add information to reports obtain this information
from a print list you supply. The query compiler stores the print list information in its
internal table. The internal table contains an entry for each element that exists in the
print list. If the internal table overflows, remove all session-wide declarations
overridden in the current report by issuing a session-wide statement (for example AT
START or TITLE) without the print list parameter.
To conserve space in the internal table, use TAB instead of SPACE in the print list to
obtain the necessary report format. The query compiler does not allocate table space
for a TAB clause whereas it does allocate table space for a SPACE clause. Judicious
use of string literals also saves table space. For example: “PHONE: ” is equivalent to
“PHONE:”, SPACE 3, but the former causes only one table entry while the latter
causes two table entries.