HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4- 152
A break can be caused either by DETAIL LINE, when a BREAK IF or BREAK
WHEN condition is satisfied, or by the TRIGGER BREAK statement. In
either case, the Report Writer function LASTBREAK is set to the lowest
break that occurred.
1. Execute TRAILER sections from level nine down to the level
contained by LASTBREAK. Each section first executes the TRAILER
statement. The WITH clause is evaluated, and if the number of
lines left on the page is less than the WITH value, a page break
is automatically triggered. If the USING clause is present, it is
then executed. Then the lines in the section are executed. The
WITH clause accounts for all PRINT output generated by the
section.
2. Update the OLDCV and OLDCV$ values. These values are not
recalculated; the values found during the DETAIL LINE or TRIGGER
BREAK are stored until this point, at which time the values are
put into the OLDCV area. All OLDCV values from levels LASTBREAK
to nine are updated.
3. Zero all TOTALS expressions from level LASTBREAK to nine.
4. Set NUMDETAIL to zero for levels LASTBREAK to nine.
5. Update NUMBREAK for levels LASTBREAK to nine. Also, the total
number of breaks [NUMBREAK(0)] is incremented.
6. Finally, all HEADER sections are executed from LASTBREAK to nine.
Each section first executes the HEADER statement. The WITH clause
is evaluated, and if the number of lines left on the page is less
than the WITH value, a page break is automatically triggered. If
the USING clause is present, it is then executed. Then the lines
in the section are executed. The WITH clause accounts for all
PRINT output generated by the section.
Errors during a section can cause the break to stop early. However, most
errors do not cause this to happen. Having fewer lines left on the page
than the WITH value automatically triggers a page break.
TRIGGER PAGE BREAK
The TRIGGER PAGE BREAK statement allows you to do page breaks manually.
This statement can occur anywhere except in the PAGE HEADER and PAGE
TRAILER sections of a report description. When this statement is
encountered, a page break executes immediately.
The suppress options of the TRIGGER PAGE BREAK statements allow for more
flexibility than automatic page breaks. The use of these options may
affect the number of lines available for printing on the page.
Syntax
[ { [{,} ]}]
[{,} {HEADER [{;} TRAILER]}]
TRIGGER PAGE BREAK [{;} SUPPRESS { [{,} ]}]
[ {TRAILER [{;} HEADER]}]
Examples
The following examples show the TRIGGER PAGE BREAK statement.
100 TRIGGER PAGE BREAK
100 TRIGGER PAGE BREAK, SUPPRESS TRAILER
100 TRIGGER PAGE BREAK, SUPPRESS HEADER, TRAILER
This statement causes an error if no report is active. If report output
has not begun, this statement starts the report.