Panels provide a powerful means of formatting the output when using the LIST statement. The format is designed on the panel, then the data is moved to the panel before the LIST statement.
For example, if a panel named CUSTPNL was defined to contain a specific number of repeating detail lines to fit on the page, you can produce a report with the following code:
SET PNL‑IDX = 1
FOR FIRST 10 CUSTOMER
MOVE CUSTOMER TO CUSTPNL.CUSTINFO(PNL‑IDX)
SET PNL‑IDX = PNL‑IDX + 1
ENDFOR
LIST PANEL CUSTPNL
The panel is first populated in the FOR construct and then listed outside the FOR construct.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|