PRINT DETAIL IF [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
PRINT DETAIL IF
The PRINT DETAIL IF statement allows the Report Writer to suppress detail
lines without affecting the rest of the report generation. This
statement affects only the output associated with the DETAIL LINE
statement. All PRINT statements as well as all output generated by
report sections are unaffected. Additionally, all breaks and totaling
are done normally.
There cannot be more than one PRINT DETAIL IF statement in a report
description.
Syntax
[PRINT] DETAIL IF boolean_expr
Parameters
boolean_expr A numeric expression used to determine if printing
should take place. Output is suppressed if the
expression is false (zero).
Examples
100 DETAIL IF Pdi !Prints if Pdi is true.
100 PRINT DETAIL IF FNX > 0 !Prints if FNX is > 0.
The PRINT DETAIL IF statement becomes busy when BEGIN REPORT executes and
remains busy until an END REPORT or a STOP REPORT is executed. The
statement is executed by the execution of a DETAIL LINE statement.
When DETAIL LINE executes, the PRINT DETAIL IF expression is evaluated
just before detailed output takes place. That is, the statement is
executed immediately before the WITH and USING clauses of DETAIL LINE. If
the PRINT DETAIL IF expression is false (zero), the WITH and USING
clauses are NOT evaluated. All HEADER and TRAILER output still takes
place. Normal PRINT statements still produce output as well.
The following programs both suppress the output of DETAIL LINE. However,
controlling the detailed output with PRINT DETAIL IF is more automatic
and centralized in one place:
Suppressed by program:
100 REPORT HEADER
...
200 END REPORT DESCRIPTION
...
500 IF Pdi THEN
510 DETAIL LINE 0 WITH N LINES USING A;X,Y
515 ELSE
520 DETAIL LINE 1 WITH N LINES USING A;X,Y
530 ENDIF
Suppressed by Report Writer:
100 REPORT HEADER
110 PRINT DETAIL IF Pdi
...
200 END REPORT DESCRIPTION
...
500 DETAIL LINE 1 WITH N LINES USING A;X,Y
MPE/iX 5.0 Documentation