DECLARE-REPORT

Function

Defines reports and their attributes.

Syntax

DECLARE-REPORT report_name
[TOC=toc_name]
[LAYOUT=layout_name]
[PRINTER-TYPE=printer_type]
END-DECLARE

Arguments

report_name

Report name.

TOC

Name of the Table of Contents.

LAYOUT

Layout name. If none is specified, the default layout is used.

PRINTER-TYPE

Type of printer. If none is specified, the default is the LINEPRINTER. 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.

Description

Issue DECLARE-REPORT in the SETUP section.

You can use DECLARE-REPORT 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 report names are specified 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 SQR.INI OUTPUT-FILE-MODE setting.

When the -KEEP or -NOLIS flags are 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 SQR.INI OUTPUT-FILE-MODE setting.

Examples

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 Also

USE-REPORT, DECLARE-LAYOUT, DECLARE-PRINTER, and DECLARE-TOC