PAGE TRAILER [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
PAGE TRAILER
The PAGE TRAILER statement in the PAGE TRAILER section is a Report Writer
statement used to print lines at the bottom of every page of a report.
This statement is executed when an automatic page break occurs or when
the TRIGGER PAGE BREAK statement executes. A page trailer is printed
after the REPORT TRAILER section and when a report ends. The page
trailer does not execute when the report terminates abnormally; for
example, when a STOP, or STOP REPORT executes in the program.
Syntax
[ [LINES]]
PAGE TRAILER [WITH num_lines [LINE ]]
[USING image [; output_list]]
Parameters
num_lines The maximum number of lines expected to be needed by the
section statement. This number reflects ALL output done
by the section.
image An image string, or a line reference to an IMAGE line.
output_list A list of output items, identical to PRINT USING.
Examples
The following examples show the use of the PAGE TRAILER statement.
100 PAGE TRAILER
100 PAGE TRAILER WITH N LINES
The WITH clause is evaluated only when BEGIN REPORT executes. This
causes the indicated number of lines to be reserved for all page
trailers. If the PAGE TRAILER section does not print on all the reserved
lines, the remaining lines are printed as blank lines. The Report Writer
cannot write extra lines in the page trailer.
The USING clause is evaluated each time a PAGE TRAILER is printed.
The PAGE TRAILER statement generates an error if no report is active.
If a report section is active; that is, executing, and encounters this
statement, then that report section is ended.
The PAGE TRAILER statement and section executes when an automatic page
break condition occurs, or when the TRIGGER PAGE BREAK statement is
executed. In these circumstances, the PAGE TRAILER prints, followed by
PAGE HEADER.
An error occurs if the program attempts to write a line in the page
trailer area and the page trailer is not suppressed.
In order to perform a page break, the PAGE TRAILER section first prints
enough blank lines to position the page trailer properly on the page.
Then the PAGE TRAILER statement executes its USING clause, if present.
The PAGE TRAILER section executes next, terminating when another REPORT
WRITER section statement is encountered. Blank lines are then printed
for the remaining lines reserved by the PAGE TRAILER and for the bottom
margin.
The page function values; that is, number of lines printed on a page,
number of lines left on a page, and number of lines output are then
updated, followed by execution of a PAGE HEADER.
The PAGE TRAILER does not print if the SUPPRESS PAGE TRAILER ON statement
has been executed. The TRIGGER PAGE BREAK statement can suppress the
page trailer with its SUPPRESS option. Refer to TRIGGER PAGE BREAK for
more information. If the page trailer is suppressed, none of the
statements in the PAGE TRAILER section are executed.
MPE/iX 5.0 Documentation