OUTPUT TO REPORT
The OUTPUT TO REPORT statement passes a single set of data values (called an
input record) to a REPORT statement.
blob is the name of a TEXT or BYTE variable to be passed to the report.
report is the name of a 4GL report by which to format the input record.
You must also declare this identifier in a REPORT statement, and invoke the
report with a previous START REPORT statement..
The OUTPUT TO REPORT statement passes data to a report, and instructs 4GL to
process and format the data as the next input record of the report.
An input record is the ordered set of values returned by the expressions that
you list between the parentheses. Returned values are passed to the specified
report, as part of the input record. The input record can correspond to a
retrieved row from the database, or to a 4GL program record, but 4GL does not require
this correspondence.
The members of the input record that you specify in the expression list of the
OUTPUT TO REPORT statement must correspond to elements of the formal argument
list in the REPORT definition in their number and their position, and must be
of compatible data types.
Arguments of the TEXT or BYTE data types are passed by reference, rather than
by value; arguments of other data types are passed by value. A report can use
the WORDWRAP operator with the PRINT statement to display TEXT values. A report
cannot display BYTE values; the character string <byte value> in output from
the report indicates a BYTE value.
You typically include the OUTPUT TO REPORT statement within a WHILE, FOR, or
FOREACH loop, so that the program passes data to the report one input record at
a time. The portion of the 4GL program that includes START REPORT, OUTPUT TO
REPORT, and FINISH REPORT statements that reference the same report is sometimes
called the report driver.
References
CALL
FINISH REPORT
REPORT
START REPORT