Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Compound PDF with a Loop?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Compound PDF with a Loop?
 Login/Join
 
Platinum Member
posted
I have a report that creates a compound PDF document based on a user submitted account unit. What I would like to do is to be able to create multiple compound PDF documents from a list of account units? Is there a way to do this with a loop?

List of account units:
110000
120000
130000

COMPOUND PDF 1 contains
Summary of 110000
Detail of 110000

COMPOUND PDF 2 contains
Summary of 120000
Detail of 120000

COMPOUND PDF 3 contains
Summary of 130000
Detail of 130000

Bethany
WF: 7.1.1
DevStudio 7.1.4


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report This Post
Expert
posted Hide Post
As far as I know, you can only create one compound PDF report per WF session, unless you FILEDEF them somewhere and HOLD them instead of PCHOLD them and then open them by some other means.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Here is a stripped down version of something I've done with a compound PDF in a loop. Maybe it can give you some ideas.

TABLE FILE WHATEVER
BY SPLIT
WHERE SPLIT EQ &SPLIT
ON TABLE HOLD AS PARMFILE FORMAT ALPHA
END
-SET &REC_CNT = &LINES;
-SET &CNTR = 0;

-REPEAT LOOP &REC_CNT TIMES;
-READ PARMFILE &SPLIT.A8.
-TYPE &SPLIT
-SET &CNTR= &CNTR + 1;
-SET &CMP_FLG = IF &CNTR EQ &REC_CNT THEN 'CLOSE' ELSE 'OPEN';

SET COMPOUND = OPEN
TABLE FILE WHATEVER
SUM
CALLSOFFERED AS 'Calls,Offer'

WHERE SPLIT EQ &SPLIT;
END
-*********************************** REPORT2 *************************************
-SET &CMP_FLG = IF &CNTR EQ &REC_CNT THEN 'CLOSE' ELSE 'OPEN';
SET COMPOUND = &CMP_FLG
TABLE FILE WHATEVER
PRINT SPLIT

IF SPLIT EQ &SPLIT
ON TABLE PCHOLD FORMAT PDF

END
-LOOP


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Can you use report caster and the burst option here anyone? I've never tried it.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
We 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.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Bethany,
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?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
quote:
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.
 
Posts: 118 | Location: Omaha, NE | Registered: June 12, 2003Report This Post
Guru
posted Hide Post
I 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


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Compound PDF with a Loop?

Copyright © 1996-2020 Information Builders