HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4- 124
Examples
The following examples show the use of the REPORT EXIT statement.
100 REPORT EXIT TRUE
100 REPORT EXIT Implementor > 0 WITH 3 LINES USING Rpt_image
The REPORT EXIT statement generates an error if no report is active.
If a report section is active (executing) and encounters this statement,
then that report section is ended.
The REPORT EXIT section executes ONLY when STOP REPORT is executed in a
program. A STOP REPORT command stops the report immediately. When STOP
REPORT is executed, the REPORT EXIT section evaluates the Boolean
condition first. If the result is FALSE (zero), control returns to the
STOP REPORT statement. If the result is TRUE (nonzero), the REPORT EXIT
statement and section are executed. A page eject is always done, whether
or not this statement is executed.
The REPORT EXIT section is executed even if report output has not
started.
NOTE It is recommended that you include a TRIGGER PAGE BREAK at the
beginning of the REPORT EXIT section. This ensures that there are
enough lines left on the page to print the message, and provides a
last page of the report that is dedicated completely to the REPORT
EXIT output.
REPORT HEADER
The REPORT HEADER statement marks the beginning of a report description.
This statement is required to define a report and is executed when the
report output is started. If neither a WITH nor a USING clause is
present, the REPORT HEADER produces no output.
Syntax
[ [LINES]]
REPORT HEADER [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 REPORT HEADER statement.
100 REPORT HEADER
100 REPORT HEADER WITH 3 LINES
200 REPORT HEADER USING Rh_image;DATE$
If no report is active, that is, BEGIN REPORT has not been executed,
program execution branches from the REPORT HEADER statement to the