[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Single select, multiple reports-sorts-headings
You can print multiple reports in one SQR. I created an
SQR that produces three reports from one select
statement. Here is what I did:
1. Created a DECLARE-LAYOUT for the reports in the
BEGIN-SETUP section. If the layout is the same for the
three reports then you only need on DECLARE-LAYOUT
otherwise you need a DECLARE-LAYOUT for each report.
2. Create a DECLARE-REPORT for each report you want to
create using the layout you defined before.
BEGIN-SETUP
DECLARE-LAYOUT LAYOUT1
PAPER-SIZE = (14,11)
FORMFEED = YES
ORIENTATION = PORTRAIT
LEFT-MARGIN = 0
TOP-MARGIN = 0
MAX-LINES = 99
MAX-COLUMNS = 132
END-DECLARE
DECLARE-REPORT REPORT1
LAYOUT=LAYOUT1
END-DECLARE
DECLARE-REPORT REPORT2
LAYOUT=LAYOUT1
END-DECLARE
END-SETUP
3. To use the report type
USE-REPORT REPORT1
code here
USE-REPORT REPORT2
code here
BEGIN-SELECT
COLUMN1 &col1
COLUMN2 &col2
COLUMN3 &col3
COLUMN4 &col4
use-report REPORT1
print &col1 (1,2)
print &col2 (2,2)
use-report REPORT2
print &col1 (1,2)
print &col2 (2,2)
print &col3 (3,2)
print &col4 (4,2)
FROM TABLE
END-SELECT
Each report will have a different name like FILE1.LIS,
FILE1.L02, FILE1.L03.
Hope this helps.
Mary Ellen