

Generating Reports Procedurally › Formatting the Report › Printing and Prototyping Reports
Printing and Prototyping Reports
The LIST PANEL statement prints the contents of a panel in the RUNLIST output of an application. Each time a LIST PANEL is issued, a new page is generated in the RUNLIST report.
The original purpose of the LIST PANEL statement was to provide a debugging and documentation tool for online applications. You can use the statement in an error procedure to print one or more panels accessed by the program that caused an error to occur.
You can also use the LIST PANEL statement to create a proof of an online program by documenting the online inputs and (with different LIST statements) detailing the program's outputs.
Another way to use the LIST PANEL statement is to print reports. The advantages to using this method are:
- You can prototype the report layout online using the same high‑productivity techniques available for prototyping user panels. Using the layout and facsimile features of panel editing, you can quickly lay out the format of a report and display it to the user for approval.
If your report width goes beyond 80 characters, you must use the following command before editing the panel parameter:
SET PANEL WIDEOPTION YES
Change the panel width option on the Parameter fill‑in to a value up to 132 characters, as needed for your application. The RUNLIST file is always allocated with a width of 132 bytes, although various physical devices can print reports wider than 132 bytes.
You can scroll in both layout and facsimile modes to show how the report looks. You can set repeated detail lines in the report in a Panel Summary definition as a repeating group with either fixed or variable occurrences.
- By naming fields in the panel summary identically with database or program‑developed fields, you can use MOVE/SET BY NAME to minimize the amount of code used in loading panel data during execution.
- LIST PANEL supports the invisible attribute (not printed) and the highlight attribute (double‑print for normal highlighting, extended highlighting features are not supported in the printout).
- This method is particularly well‑suited for preprinted forms, with totals printed in fixed positions on the form.
Some additional considerations are:
- You can print only one report per application. This is because the LIST PANEL statement uses the application's single RUNLIST file that is shared by the main program and all subprograms in an application run‑unit.
- LIST statements coded for debugging and in error procedures that are left in the program can interfere with proper formatting of a report by adding unwanted information at the bottom of each form. Do not use this technique in complex applications because the main program or any of its subprograms can add this information.
- Using the LIST PANEL technique of printing reports truncates any data beyond the 132‑byte width.
- The advanced manipulation techniques of the CA Ideal Report Writer are not available with LIST PANEL, therefore:
- Sorted reports and control breaks must be specifically provided for your programs.
- Automatic functions such as TOTAL, AVERAGE, MAXIMUM, and MINIMUM, must be coded explicitly into your program.
- ASSIGN statements and commands that apply to report entities do not apply to LIST PANEL reports.
- Date data types must be explicitly translated into user‑specified date formats since panels do not support the date data type.
- This technique does incur more overhead than using the Report Writer, so it might be appropriate only for producing relatively small amounts of output.
Copyright © 2015 CA Technologies.
All rights reserved.
 
|
|