HP 3000 Manuals

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


HP Business BASIC/XL Reference Manual

BEGIN REPORT 

The BEGIN REPORT statement activates a report, but does not start report
output.  The report description is verified and some Report Writer
expressions are evaluated.  The report is not activated unless BEGIN
REPORT executes correctly.  This statement can not appear within a report
description.

Syntax 

BEGIN REPORT line_id 

Parameters 

line_id          The line number or line label of the REPORT HEADER for
                 the report to use.  The line indicated can be a comment,
                 provided that only comments occur between the given line
                 and the REPORT HEADER statement.

Examples 

     100 BEGIN REPORT 500
     100 BEGIN REPORT Report_1

An error occurs if a report is active when BEGIN REPORT executes.  This
statement searches for a REPORT HEADER statement starting with the line
indicated.  Only comments can occur between the given line and the REPORT
HEADER statement.

Once the REPORT HEADER is found, the Report Writer scans the report
description.  The report scan uses two passes.  The first pass determines
what sections are valid, and then the second pass evaluates necessary
expressions.  The following actions take place during the scanning
process:

First Pass:

 *  Section statements are made busy.  In addition, the TOTALS, GRAND
    TOTALS, PRINT DETAIL IF, BREAK IF, and BREAK WHEN statements are made
    busy.  Busy lines cannot be deleted or modified (See "Busy Lines and
    Subunits" in chapter 2).

 *  All level expressions are evaluated.  This affects HEADER, TRAILER,
    BREAK IF, and BREAK WHEN statements.  TOTALS statements are
    indirectly affected, as they are ignored if the last HEADER or
    TRAILER section has a level expression equal to zero.

Second Pass:

 *  The PAGE LENGTH, LEFT MARGIN, PAUSE EVERY, SUPPRESS AT, and SUPPRESS
    FOR statements are evaluated.

 *  The TOTALS and GRAND TOTALS are set to zero.

 *  BREAK IF and BREAK WHEN statements are evaluated.  This includes
    evaluation of the control expressions and the BY clause values.  The
    OLDCV and OLDCV$ values are initialized.  For BREAK WHEN statements
    with a BY clause, the initial limit and multiple values are set up.

 *  The WITH clauses of the PAGE HEADER and PAGE TRAILER sections are
    evaluated if present.  This determines the usable page size.  A check
    is made to ensure that there are lines left on the page after the
    PAGE sections are counted.

If any error occurs during BEGIN REPORT, the report is not activated.



MPE/iX 5.0 Documentation