Martin Yergeau Posted January 21, 2021 Share Posted January 21, 2021 Hi community, No luck with my search. I am pretty sure that this has already been discussed but cant find it. And I think that I wouldnt have other choices than creating a compound PDF document but looking if I can avoid it. I have reproduced with a simple sample using car file. When using RC bursting option, the reports only contain the second page (Total By Model) when I expect to have two pages per burst value. Or I have all expected pages in different pdf files if I use only ON TABLE PCHOLD FORMAT PDF without the OPEN/CLOSE feature. Is there a way to have the two pages in one pdf file burst by RC So, in my sample, I should have 5 documents with 2 pages each, not 10 with one page or 5 with only the second page. TABLE FILE CAR SUM SEATS RETAIL_COST BY COUNTRY BY CAR AS 'SUMFLD' ON TABLE HOLD AS TOTCAR END -RUN TABLE FILE CAR SUM SEATS RETAIL_COST BY COUNTRY BY MODEL AS 'SUMFLD' ON TABLE HOLD AS TOTMDL END -RUN -REPEAT LOOPRPT FOR &I FROM 1 TO 2 -SET &OPENCLOSE = DECODE &I (1 'OPEN' 2 'CLOSE'); -SET &INFILE = DECODE &I (1 'TOTCAR' 2 'TOTMDL'); -SET &HEAD = DECODE &I (1 'Total By Car' 2 'Total By Model'); -SET &COLT = DECODE &I (1 'Car' 2 'Model'); TABLE FILE &INFILE SUM SEATS RETAIL_COST BY COUNTRY NOPRINT BY SUMFLD AS '&COLT' HEADING "&HEAD - <COUNTRY" "" -*ON TABLE PCHOLD FORMAT PDF ON TABLE PCHOLD FORMAT PDF &OPENCLOSE ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, PAGECOLOR='WHITE', PAGESIZE='Letter', SQUEEZE=ON, LEFTMARGIN=0.5, RIGHTMARGIN=0.5, TOPMARGIN=0.5, BOTTOMMARGIN=0.5, ORIENTATION=LANDSCAPE, $ TYPE=HEADING, LINE=1, SIZE=14, STYLE=BOLD, JUSTIFY=CENTER, $ ENDSTYLE END -LOOPRPT Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted January 21, 2021 Share Posted January 21, 2021 Martin What does your distribution list look like Do you have entries for both car and model as the burst value Also I noticed that you have COUNTRY as the first BY field in the final report and bursting is based on the first BY field even if it is a NOPRINT. Link to comment Share on other sites More sharing options...
Martin Yergeau Posted January 21, 2021 Author Share Posted January 21, 2021 The burst value is COUNTRY reason why this field is there as a NOPRINT Link to comment Share on other sites More sharing options...
David Beagan Posted January 21, 2021 Share Posted January 21, 2021 MartinY, I didnt actually test the following code to verify that it would burst in the way you want, but it seems like it would. FILEDEF TOTCAR DISK totcar.txt (APPEND SET ASNAMES=ON, HOLDLIST=PRINTONLY TABLE FILE CAR SUM SEATS RETAIL_COST COMPUTE Page/I5 = 1; COMPUTE HEAD/A15 = 'Total By Car'; COMPUTE Title/A10 = 'Car'; BY COUNTRY BY CAR/A20 AS 'SUMFLD' ON TABLE HOLD AS TOTCAR END TABLE FILE CAR SUM SEATS RETAIL_COST COMPUTE Page/I5 = 2; COMPUTE HEAD/A15 = 'Total By Model'; COMPUTE Title/A10 = 'Model'; BY COUNTRY BY MODEL/A20 AS 'SUMFLD' ON TABLE HOLD AS TOTCAR END TABLE FILE TOTCAR "<HEAD - <COUNTRY" " " PRINT SEATS AS '' RETAIL_COST AS '' HEAD NOPRINT BY COUNTRY NOPRINT BY Page NOPRINT BY SUMFLD AS '' ON Page SUBHEAD "<Title<+0>Seats<+0>RETAIL_COST" ON Page PAGE-BREAK ON TABLE PCHOLD FORMAT PDF ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET STYLE * SQUEEZE=ON, ORIENTATION=LANDSCAPE, LEFTMARGIN=0.5, RIGHTMARGIN=0.5, TOPMARGIN=0.5, BOTTOMMARGIN=0.5, $ TYPE=REPORT, COLUMN=SEATS, WRAP=.5,$ TYPE=REPORT, COLUMN=RETAIL_COST, WRAP=1.1,$ TYPE=HEADING, FONT=ARIAL, SIZE=14, STYLE=BOLD, JUSTIFY=CENTER, $ TYPE=SUBHEAD, COLOR=MAROON, HEADALIGN=BODY, BACKCOLOR=RGB(240 240 240),$ ENDSTYLE END Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted January 21, 2021 Share Posted January 21, 2021 I did test it and it works well. Good job! Link to comment Share on other sites More sharing options...
Martin Yergeau Posted January 21, 2021 Author Share Posted January 21, 2021 Thanks for the option David Ive also been able to make it work using Compound report that I would like to avoid since I now have two processes: one version with no bursting and one with bursting Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now