Reports / The report routine |
Specifies report destination and page format options.
OUTPUT [ REPORT TO { SCREEN | PRINTER | [ FILE ] filename | PIPE [ IN FORM MODE | IN LINE MODE ] program } ] [ [ LEFT MARGIN m-left ] [ RIGHT MARGIN m-right ] [ TOP MARGIN m-top ] [ BOTTOM MARGIN m-bottom ] [ PAGE LENGTH m-length ] [ TOP OF PAGE c-top] ]
The OUTPUT section can specify the destination and dimensions for output from the report and the page-eject sequence for the printer. If you omit the OUTPUT section, the report uses default values to format each page. This section is superseded by any corresponding START REPORT specifications.
The OUTPUT section can direct the output from the report to a printer, file, or pipe, and can initialize the page dimensions and margins of report output. If PRINTER is specified, the DBPRINT environment variable specifies which printer.
The START REPORT statement of the report driver can override all of these specifications by assigning another destination in its TO clause or by assigning other dimensions, margins, or another page-eject sequence in the WITH clause.
Because the size specifications for the dimensions and margins of a page of report output that the OUTPUT section can specify must be literal integers, consider defining page dimensions in the START REPORT statement, where you can use variables to assign these values dynamically at runtime.