HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

4-: 125
statement after the matching END REPORT DESCRIPTION statement.
If a report is active and the REPORT HEADER statement is executed, two
possible actions can occur. If another report section is active, that
section is ended. Otherwise, the statement is unexpected and an error
occurs.
The REPORT HEADER section is executed when report output begins. The
section only executes once. Report output starts when any of the
following statements executes after a BEGIN REPORT statement has been
executed:
DETAIL LINE
TRIGGER BREAK
TRIGGER PAGE BREAK
END REPORT
When the REPORT HEADER section executes, the REPORT HEADER statement
output, if any, is done first. For further information about the REPORT
HEADER refer to the WITH and USING clauses. Execution continues with the
line following the REPORT HEADER until another Report Writer section
statement is encountered.
REPORT TRAILER
The REPORT TRAILER section defines a block of code to be executed at the
end of a report only if the END REPORT statement is executed. The report
trailer is printed after the break-level trailers. This section is
optional. The REPORT TRAILER statement must occur within a report
description; that is, between the REPORT HEADER statement and the END
REPORT DESCRIPTION statement. If neither the WITH or USING clause is
present, the statement produces no output, but, there must be at least
one line of space left on the page.
Syntax
[ [LINES]]
REPORT 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 the list used by
the PRINT USING statement.
Examples
The following examples show the use of the REPORT TRAILER statement.
100 REPORT TRAILER
100 REPORT TRAILER WITH 3 LINES USING Rt;DATE$
If a report is not active, the REPORT TRAILER statement generates an error.
If the statement is encountered when a report section is not executing,
an error occurs. If a report section is active; for example, a TRAILER
section, that section ends.
The REPORT TRAILER section becomes active when END REPORT executes. All
of the break level trailers are printed before the report trailer. A
page trailer is printed after the report trailer.