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.
In the same program I had the -REPEAT question, I have another one related to multiple PDF files being generated.
Basic code: -REPEAT ... -READ ... SET COMPOUND = OPEN TABLE FILE FN .... ON TABLE PCHOLD AS PDF END SET COMPOUND = CLOSE TABLE FILE FN .... ON TABLE PCHOLD AS PDF END
Instead of using PCHOLD, I want to hold/save each compound file as a unique name on my server. Something like this.
-REPEAT ... -READ ... -SET PRTFN = &VAR1||&VAR2; -* var1 & var2 comes from the file read
SET COMPOUND = OPEN TABLE FILE FN .... ON TABLE HOLD AS PDF END SET COMPOUND = CLOSE TABLE FILE FN .... ON TABLE PCHOLD AS &PRTFN END
This is not working, I only get the first report in the brower. It won't save it to the server.
Anyone got any ideas how to hold/save each PDF report as a unique name and have the loop continued, doing the next read and hold?
Thanks, RaeleneThis message has been edited. Last edited by: Kerry,
Posts: 31 | Location: Oklahoma City, OK | Registered: September 11, 2003
The part I'm having trouble with is saving the compound report as a unique name to the server under a specific directory. The PDF files will be picked up by another software/person for printing. Since the compound report consists of two PDF reports, I can't figure out how to save them to the server because there are two names (one for the first table file, the second for the second table file). Does this make more sense?
Posts: 31 | Location: Oklahoma City, OK | Registered: September 11, 2003
-** Set up error -SET &CTR=0; -** Initialize IORETURN for the Repeat Loop -SET &IORETURN = 0; -*** Set up the file name and file def for the external file. -SET &FILE_NAME='D:\PATHNAME\DATA.DAT'; FILEDEF FN DISK &FILE_NAME -RUN -******************** -**** START LOOP **** -******************** -REPEAT :END_LOOP WHILE &IORETURN EQ 0; -***** read in input data from external file ***** -READ AS_PRINT,NOCLOSE &VAR1 &VAR2 &VAR3 -IF &IORETURN NE 0 GOTO :END_LOOP; -********************************************************************* -*** Set up file def for compound PDF hold file. -*** Each report will be saved to the server with a unique file name. -********************************************************************* -** Add 1 to counter, this is part of the PDF file name. -SET &CTR = &CTR + 1; -SET &PRT_FLNM='AS_'||&CTR||'.PDF'; -SET &HOLDAS = 'AS_'||&CTR; FILEDEF &HOLDAS DISK D:\PATHNAME\&PRT_FLNM -RUN -*** create report1 TABLE FILE FILENAME1 PRINT... ON TABLE HOLD AS &HOLDAS FORMAT PDF OPEN END -RUN -*** create report2 TABLE FILE FILENAME2 PRINT ... ON TABLE HOLD AS &HOLDAS FORMAT PDF CLOSE END -RUN -:END_LOOP -********************** -**** END OF LOOP **** -**********************
Posts: 31 | Location: Oklahoma City, OK | Registered: September 11, 2003
You mean two different PDF documents in one browser instance? Don't know if that's possible, never seen it done. But maybe it can be done if you have two iframes on the page and populate each one with it's own pdf. Really no idea if that might work.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Depending on your browser settings this will open the PDFs either in the frames or will open 2 acrobat documents. Note the PDF outputs must be saved to a webserver readable location
APP FI PDF1 DISK baseapp/PDF1.PDF
APP FI PDF2 DISK baseapp/PDF2.PDF
-RUN
TABLE FILE CAR
BY COUNTRY
ON TABLE HOLD AS PDF1 FORMAT PDF
END
-RUN
TABLE FILE CAR
BY CAR
ON TABLE HOLD AS PDF2 FORMAT PDF
END
-RUN
-HTMLFORM BEGIN
<HTML>
<body>
<iframe src='http://localhost:9090/approot/baseapp/pdf1.pdf'>
</iframe>
<iframe src='http://localhost:9090/approot/baseapp/pdf2.pdf'>
</iframe>
</body>
</html>
-HTMLFORM END