March 30, 2007, 11:22 AM
LeahCan you use report caster and the burst option here anyone? I've never tried it.
March 30, 2007, 12:36 PM
Darin LeeWe do this with Report Caster and bursting as Leah mentioned, using FTP to distribute the multiple output documents burst on a market sector. I don't think there is any other way to generate multiple PDF documents in one session. Of course, if they can all be in the same document, we use something similar to Prarie's code.
March 31, 2007, 01:57 PM
Danny-SRLBethany,
What do you want to achieve? One output containing all the data of all the accounts or many different outputs? And where would the output(s) go, to the screen, a printer, different files?
April 02, 2007, 12:11 PM
Lushengquote:
110000
120000
130000
I have done a few compound PDF reports similar to yours. The first step is you save your list of account (110000 120000 130000) to a text file. Within the REPEAT statement, you use -READ SAVE NOCLOSE ... to get one account at a time. Base on the account read from the saved file, you dynamically construct SUM statement and WHERE statement. You also need dynamically construct FORMAT PDF portion of that (ON TABLE HOLD FORMAT PDF OPEN) statement (separate that statement into two 2 lines in order to code easier). The first account is FORMAT PDF OPEN, and the last account is FORMAT PDF CLOSE.
April 03, 2007, 03:18 PM
GlendaI this what you are wanting to accomplish only with PDF?
FILEDEF CNTRL DISK /edadata/cntrl.dat
-SET &CNTR = 1;
-SET &CNTRC = 0;
-*
-SET &CNTRY = '';
FILEDEF TTEXT DISK /edadata/ttext.dat
DEFINE FILE CAR
CNTRC/I9 = IF COUNTRY EQ LAST COUNTRY THEN LAST CNTRC ELSE CNTRC + 1;
END
-*
TABLE FILE CAR
SUM LST.CNTRC
ON TABLE SAVE AS CNTRL FORMAT ALPHA
END
-*
FILEDEF CNTRL DISK /edadata/cntrl.dat
-RUN
-READ CNTRL, &CNTRC
-*
-REDO
-*
-SET &CNTRY = '';
DEFINE FILE CAR
CNTRC/I9 = IF COUNTRY EQ LAST COUNTRY THEN LAST CNTRC ELSE CNTRC + 1;
CNTRY/A10 = COUNTRY;
END
-*
TABLE FILE CAR
PRINT CNTRY
BY CNTRC NOPRINT
WHERE CNTRC EQ &CNTR
WHERE RECORDLIMIT EQ 1
ON TABLE SAVE AS TTEXT FORMAT ALPHA
END
-*
FILEDEF TTEXT DISK /edadata/ttext.dat
-RUN
-READ TTEXT, &CNTRY
-*
DEFINE FILE CAR
CNTR/I9 = IF COUNTRY EQ LAST COUNTRY THEN LAST CNTR ELSE CNTR + 1;
COUNTRY1/A10 = '&CNTRY';
END
-*
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
BY COUNTRY
WHERE CNTR EQ &CNTR
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT=SUMMARY FOR &CNTRY, $
TYPE=HEADING, SIZE=18, $
ENDSTYLE
-IF &CNTR = 1 THEN GOTO THEOPEN;
-IF &CNTR EQ &CNTRC THEN GOTO THECLOSE;
-CONTINUE
ON TABLE PCHOLD FORMAT EXL2K
END
-GOTO SETTER
-THEOPEN
ON TABLE PCHOLD FORMAT EXL2K OPEN
END
-GOTO SETTER
-THECLOSE
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END
-GOTO SETTER
-SETTER
-SET &CNTR = &CNTR + 1;
-IF &CNTR = 6 THEN GOTO STOPPER;
-GOTO REDO
-STOPPER
-EXIT