HP 3000 Manuals

TRAILER [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

TRAILER 

The TRAILER statement allows you to define logical levels for separating
and summarizing data printed in a report.  The TRAILER section is used to
print trailing data for a particular level in the report of which there
are nine levels available.

In order to define a report level, there must be a TRAILER or HEADER
statement in the report description.  However, there can not be more than
one TRAILER section for a single level within the report description.  If
no WITH or USING clause is present, the statement produces no output.
However, other statements in this section might produce output.

Syntax 

                     [               [LINES]]
TRAILER level_number [WITH num_lines [LINE ]]

[USING image [; output_list]]

Parameters 

level_number     A numeric expression with a value from 0 to 9.  This
                 defines the summary or break level for this trailer
                 section.  This number is used to create different
                 summary levels for data, and to cause 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, identical to the list used by
                 the PRINT USING statement.

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.



MPE/iX 5.0 Documentation