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.
I am testing a POC. I am writing a fex that produces a PDF (ON TABLE PCHOLD FORMAT PDF).
I want save the pdf produced in a specific file on my hard drive (ie. C:\temp\car.pdf). I want to then be able to open the file up with ADOBE and see the pdf that was created.
Could someone offer assistance with this.
Thanks.
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
FILEDEF VPDOC DISK \\velo\iscsc$\reports\vpdoc.pdf
Hi Prarie.
I've tried both on table "save" and "pchold" and when I look at temp1 the TLBPOC01.pdf file is not there. -* File timpoc.fex -*FILEDEF TLBPOC DISK C:\TEMP1\TLBPOCTEST FILEDEF TLBPOC1 DISK \\TEMP1\TLBPOC01.PDF
TABLE FILE BE_MERCHANT PRINT BANK_NUMBER MERCHANT MERCHANT_NAM PHONE_NUM MERCHANT_LEGAL_NAM HEADING "This is a test report " WHERE BANK_NUMBER EQ '1922'; WHERE RECORDLIMIT EQ 10 ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SAVE FORMAT PDF -*ON TABLE PCHOLD FORMAT PDF ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, $ ENDSTYLE END
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
this is my latest...still no file on my hard drive
FILEDEF TLBPOC1 DISK \\TEMP1\tlbpoc01.pdf
TABLE FILE BE_MERCHANT PRINT BANK_NUMBER MERCHANT MERCHANT_NAM PHONE_NUM MERCHANT_LEGAL_NAM HEADING "This is a test report " WHERE BANK_NUMBER EQ '1922'; WHERE RECORDLIMIT EQ 10 ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE HOLD FORMAT PDF AS TLBPOC1 ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, $ ENDSTYLE END
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
try putting a -RUN after the filedef. On a related note, why not just let WF perform the default functionality (ON TABLE SET ONLINE_FMT PDF) . It opens in the Acrobat viewer so you can see it. You can save it from there to wherever you want so you can play with it further.
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, 2007
I included the -RUN still no file on my hard drive. The POC is to see if I can hold a Webfocus created PDF to a file and another user (who does not have WF) can open that file and fiew the PDF. This is why I'm not holding as pdf. I'm using my box to test this concept.
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
Please also remember that the PDF file is created on the machine where the WebFOCUS Server is installed. It will not be able to put the file onto a directory that is on your desktop computer.
For your FILEDEF to work, the machine on which the WebFOCUS server is installed must be able to recognize the directory. Is the WebFOCUS server machine able to access the \\TEMP1 directory?
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Use the ON TABLE PCHOLD FORMAT PDF statement. This tells WebFOCUS to send the PDF document to your browser. your browser will then recignize the .PDF extension and start the Adobe Reader for you.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
No the WF server cannot see my box. Is their no way to create a .pdf file on any file I'm able to write to on the network and someone can just open that file up with adobe?
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
Guess I was not understanding the question all the way. There isn't a way to "automagically" run and hold the PDF file on an external box. The ON TABLE PCHOLD would send it back to a browser and the user can then save to wherever they want and another user could access it. That being said, here's a way around that. If the WF server has access to network drives (you may want to have a mapped drive as it may be less confusing) you could create a directory mapping on the WF server (say HOLDPDF that points to network drive N: or \\servername\users\PDFrpts) and add it to the server path. If you then do APP HOLD HOLDPDF and use ON TABLE HOLD AS TLBPOC1 FORMAT PDF in your fex, it should create the file on the network drive that can be accessed by other users.
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, 2007
Thanks Darin, I'll give this suggestion a try. Essentially I will need to do this even if I'm writing to my box... correct?
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
You need to remember that the PDF document created can only be written to directories which the WebFOCUS server has access to. If you really need it to be written to YOUR machine then you will need to share a directory on your machine with the network and then map a network drive (as Darrin stated) on the WebFOCUS server to point to the shared directory on your machine. You then need to do two things:
1) Add an application directory mapping to the APP PATH for the HOLDPDF. Do this by adding the following statement to your focexec:
APP MAP HOLDPDF mapped_network_drive_name
2) Add the following statement to your focexec:
APP FI TLBPOC1 DISK HOLDPDF/tlbpoc1.pdf
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
Well...I created a new folder and put it in the app path...the .pdf gets created successfully in that file with this code. APP FI TLBPOC1 DISK POC/tlbpo1.pdf -*FILEDEF TLBPOC1 DISK \\TEMP1\tlbpoc01.pdf -RUN TABLE FILE BE_MERCHANT PRINT BANK_NUMBER MERCHANT MERCHANT_NAM PHONE_NUM MERCHANT_LEGAL_NAM HEADING "This is a test report " WHERE BANK_NUMBER EQ '1922'; WHERE RECORDLIMIT EQ 10 ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SAVE FORMAT PDF AS TLBPOC1 ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, $ ENDSTYLE END
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
Please disregard previous post. File was created correctly. I needed to ftp the file as binary
Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC