HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4-: 151
Examples
100 TRAILER 1 WITH 3 LINES
100 TRAILER Order(1) USING Hd_image;Who
If a report section is active when this statement is seen, the section is
ended. An error occurs if this statement is executed directly when a
report section is not active.
When BEGIN REPORT executes, the
level
_
number
of each TRAILER statement is
evaluated and the statement is made BUSY. TRAILER sections with level
numbers equal to zero are ignored. All of the level numbers are
therefore fixed by BEGIN REPORT and the statements are made busy. All
nonzero TRAILER levels must be distinct and within the range of one to
nine. The levels do not have to be contiguous. A TRAILER statement can
define a section without a corresponding HEADER section and vice versa.
TRAILER sections are executed when an automatic break occurs from BREAK
IF or BREAK WHEN, or when the TRIGGER BREAK statement. TRAILER sections
are printed in descending sequence by level number. See DETAIL LINE and
EXECUTION FLOW for more details on automatic breaks.
The TRAILER sections are automatically executed when the report output
stops normally. The trailers precede the printing of the report trailer
and page trailer, printing in descending order.
A particular TRAILER section executes the TRAILER statement first. This
causes the evaluation of the WITH clause first that may cause a page
break, followed by the execution of the USING clause. Any additional
statements in the TRAILER section execute after the TRAILER statement.
TRIGGER BREAK
The TRIGGER BREAK statement allows you to manually cause a Report Writer
break to take place. This results in the printing of the TRAILER and
HEADER sections.
The TRIGGER BREAK statement can not occur within a report description.
Syntax
TRIGGER BREAK
break_level
Parameters
break_level
A numeric expression in the range zero to nine. A level
of zero has no effect. Other values cause a break to
take place at the given level.
Examples
100 TRIGGER BREAK 5
100 IF Old_data <> New_data THEN TRIGGER BREAK N
The TRIGGER BREAK statement generates an error if a report is not active.
If report output has not started, this statement starts the report,
followed immediately by the break.
The
break_level
is evaluated after starting the report if this is
necessary. Then all BREAK statements are evaluated in order to determine
the new values for OLDCV and OLDCV$. Then the break actually occurs.
Executing a Report Writer Break
The execution of a summary level break involves several steps. Each step
can execute several different sections of the report. The processing of
the break is described below, in the order in which actions are taken.