DETAIL LINE [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
DETAIL LINE
The DETAIL LINE statement is the foundation for Report Writer execution.
When the DETAIL LINE statement is executed, all break conditions are
tested and triggered, if appropriate, before the detail line output is
produced. In addition, this statement causes all totals to be
incremented.
This statement can not occur within a report definition. Also, it can
not be executed while any other break condition such as a level break or
a page break is being executed.
Syntax
[ [LINES]]
DETAIL LINE totals_flag [WITH num_lines [LINE ]]
[USING image [; output_list]]
Parameters
totals_flag A numeric expression in the SHORT INTEGER range. This
value is used as a Boolean to determine what work must
be done.
num_lines The maximum number of lines expected to be needed by
this statement. This number reflects ALL output done
before the next DETAIL LINE statement executes.
image An image string or a line reference to an IMAGE line.
output_list A list of output items that is identical to the list for
the PRINT USING statement.
Examples
The following examples show the DETAIL LINE statement.
100 DETAIL LINE J WITH 3 LINES
100 DETAIL LINE True
100 DETAIL LINE 0 WITH 2 LINES USING Image_line;A, B
If the report has not been activated, DETAIL LINE reports an error. If
the report output has not started, this statement starts the report
output. When starting the report, DETAIL LINE evaluates all BREAK
statements in order to update OLDCV/OLDCV$ values, but no break takes
place. Once the report output has started, all work depends on the value
of the totals_flag.
The totals flag is always evaluated by DETAIL LINE. If its value is TRUE
(nonzero), break conditions are checked and totals are automatically
accumulated. If the totals flag is FALSE (zero), this work is not done.
The output of DETAIL LINE can be controlled by the PRINT DETAIL IF
statement. If this statement exists in the report, it is evaluated. If
the PRINT DETAIL IF statement is FALSE (zero), the DETAIL LINE statement
ends. The WITH and USING clauses are not executed.
If PRINT DETAIL IF returns TRUE, or if the statement does not occur in
the report description, the WITH and USING clauses are executed if they
exist.
The work done by DETAIL LINE is shown in the following section. The
description of executing a break condition occurs after the TRIGGER BREAK
statement.
Execution of DETAIL LINE
The following is a sequential description of what happens when the DETAIL
LINE statement executes.
* Checks are made to see that DETAIL LINE can be executed. For this to
take place, the report must be active and that there are no Report
Writer sections currently executing.
* If necessary, the report is started. This will cause the REPORT
HEADER, PAGE HEADER, and all HEADER sections to execute.
* The totals_flag is evaluated. This value is used as a Boolean value.
* If the totals_flag is true (nonzero), do the following:
* Evaluate ALL break statements, watching for the lowest numbered
BREAK statement that is satisfied. The BREAK IF and BREAK WHEN
statements are evaluated in summary level order, from one to
nine. During these checks, the CURRENT LEVEL from the RWINFO
built-in function changes to reflect the BREAK statement
executed.
* If a BREAK condition is satisfied, LASTBREAK is set to the lowest
numbered BREAK statement with a satisfied BREAK condition. Take
the following steps:
* Set CURRENT LEVEL to LASTBREAK.
* Trigger breaks from level LASTBREAK through nine. This causes the
TRAILER and HEADER sections to execute. Some Report Writer counters
are updated, totals are reset and OLDCV values are reset. This
process is described under TRIGGER BREAK.
* Accumulate all TOTALS. GRAND TOTALS are evaluated and added
first, then TOTALS are done in ascending level number order.
* Evaluate the PRINT DETAIL IF statement. If the statement does
not occur, or if the expression is true (nonzero), do the
following:
* Evaluate the WITH clause of DETAIL LINE. If the number of
lines left before the page trailer or end of page is smaller
than the WITH value, automatically trigger a page break. If
a WITH clause is not specified, there must be one line left
on the page.
* If the USING clause is present on the DETAIL LINE statement,
print the detailed line as indicated by the USING clause and
the expressions that follow it.
MPE/iX 5.0 Documentation