DECLARE-REPORT
Syntax
DECLARE-REPORT report_name [TOC=toc_name] [LAYOUT=layout_name] [PRINTER-TYPE=printer_type] END-DECLARE
Description
Defines reports and their attributes.
Issue the DECLARE-REPORT in the SETUP section.
You can use the DECLARE-REPORT command to declare one or more reports to be produced in the application.
You must use this command when developing applications to produce more than one report.
Multiple reports can share the same layout and the same printer declarations or each report can use its own layout or printer definitions if the report has unique characteristics.
When you are printing multiple reports, unless you specify report names by using the -F command-line flag, the first report declared is generated with the name of program.lis, where program is the application name.
Additional reports are generated with names conforming to the rules dictated by the OUTPUT-FILE-MODE setting in the pssqr.ini file.
When the -KEEP or -NOLIS flag is used, the first intermediate print file (.spf file) is generated with a name of program.spf and additional reports are generated with names conforming to the rules dictated by the OUTPUT-FILE-MODE setting in the pssqr.ini file.
Parameters
| Parameter | Description |
|---|---|
|
report_name |
Specifies the name of the report. |
|
TOC |
Specifies the name of the table of contents for this report. |
|
LAYOUT |
Specifies the name of the layout for this report. If no layout is specified, the default layout is used. |
|
PRINTER-TYPE |
Specifies the type of printer to be used for this report. If no printer type is specified, the default, LINEPRINTER, is used for this report. If no DECLARE-PRINTER is specified, DEFAULT-LP is used. Valid values for PRINTER-TYPE are HT, HP, PD, PS, LP, HTML, HPLASERJET, POSTSCRIPT, and LINEPRINTER. |
Example
The following example illustrates the DECLARE-REPORT command:
declare-layout customer_layout
left-margin
right-margin
end-declare
declare-layout summary_layout
orientation=landscape
end-declare
declare-report customer_detail
toc=detailed
layout=customer_layout
printer-type=postscript
end-declare
declare-report customer_summary
layout=summary_layout
printer-type=postscript
end-declare
.
.
.
use-report customer_detail
...print customer detail...
use-report customer_summary
...print customer summary...
See USE-REPORT, DECLARE-LAYOUT, DECLARE-PRINTER, DECLARE-TOC