HEADER [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
HEADER
The HEADER statement allows you to define logical levels for separating
and summarizing data printed in a report. The HEADER section is used to
print headings for a particular level in the report. There are nine
levels available.
In order to define a report level, there must be a HEADER or TRAILER
statement in the report description. However, there can not be more than
one HEADER section for a single level within the report description. If
a WITH or USING clause is not present, the statement does not produce
output. However, other statements in this section can produce output.
Syntax
[ [LINES]]
HEADER level_number [WITH num_lines [LINE ]]
[USING image [; output_list]]
Parameters
level_number A numeric expression in the range [0, 9]. This defines
the summary or break level for this header section.
This number creates different summary levels for data,
and causes breaks in the report at appropriate times. A
level of zero causes the entire section to be ignored.
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. This list is identical to the
list used by PRINT USING.
Examples
100 HEADER 1 WITH 3 LINES
100 HEADER Order(1) USING Hd_image;Who
The HEADER statement generates an error if there is not an active report.
If a report section is active (executing) and encounters this statement,
then that report section ends.
When BEGIN REPORT executes, the level_number of each HEADER statement is
evaluated. HEADER sections with level numbers equal to zero are ignored.
All of the level numbers are fixed by BEGIN REPORT and the HEADER
statements become busy. All nonzero HEADER levels must be distinct and
within the range of one to nine. The levels do not have to be
contiguous. A HEADER statement can define a section without a
corresponding TRAILER section and vice versa.
HEADER statements and sections execute when an automatic break occurs
from BREAK IF or BREAK WHEN, or when the TRIGGER BREAK statement
executes. HEADER sections are printed in ascending sequence by level
number. See the DETAIL LINE statement for more details about automatic
breaks.
The HEADER sections automatically execute when report output starts. The
headers follow the printing of the report header and page header,
printing in ascending order.
A particular HEADER section executes the HEADER statement first. This
causes evaluation of the WITH clause first (which can cause a page break)
followed by the execution of the USING clause. Additional statements in
the HEADER section execute after the HEADER statement.
MPE/iX 5.0 Documentation