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'm trying to create a .fex which, when run, will open an existing (non-WebFocus) PDF.
From DOS, I can do START, and then the name of the PDF and the PDF will open. I've used the COPY DOS command in unrelated focexecs. But, I'm not able to open a PDF from within a focexec. I've tried all kinds of syntax. Either it says "EDA no data" or it just says it's waiting for a response from the server. I then kill the job after several minutes.
The above are variations of the path of the file that work in other focexecs for other purposes.
This is an abbreviated sample of a DOS COPY command I've used succesfully elsewhere: -DOS COPY F:\SYSTEM\IBI\APPS\Dashboard_iPad\Indirect_04_Report.txt File2
I found a posting from someone on Focal Point with the same problem from a few years ago. He suggested using something like:
But I get an error about not being able to use EXEC. I get similar error messages when trying some other DOS commands which should (or might otherwise) open a file. I don't get that error with START, but it either says "no data" or does nothing.
I'm thinking the problem deals with how I'm specifying the path of the file, and that WebFocus can't find it. But, on the other hand I can do DOS COPY with the same formatting of a file, and it can be found by WebFocus.
Thanks,This message has been edited. Last edited by: <Kathryn Henning>,
Thanks,
~Mark
WebFocus Client 7.703 WebFocus Reporting Server 7.705 Windows Server 2008 R2 Dev Studio 7.703 Apache Tomcat/6.0.20 Excel, PDF IWAY DM Server 7.705 DataMigrator 7.705
Posts: 27 | Location: Maryland | Registered: March 09, 2006
would be the URL link. That gives me "EDA no data"
To go into more detail.....
I want the PDF to open when a user clicks a button on an html page. There are several buttons for several PDFs. I can use a button - technically a text box - and add hyperlink properties and point to a URL - /approot/Dashboard_iPad/Bud.pdf. This works fine.
However, I'd like to run some WebFocus code in the background before the PDF opens (when the user pushes the button). I can put that code in a .fex, but I can't figure out the DOS (or whatever) command to open the PDF from within that .fex (after that initial WebFocus code runs).
Thanks,
~Mark
WebFocus Client 7.703 WebFocus Reporting Server 7.705 Windows Server 2008 R2 Dev Studio 7.703 Apache Tomcat/6.0.20 Excel, PDF IWAY DM Server 7.705 DataMigrator 7.705
Posts: 27 | Location: Maryland | Registered: March 09, 2006
I tried your example, along with many variations. Either it comes up with an empty PDF, or it gives me error messages (when the syntax obviously wasn't right).
I even copied my PDF to baseapp, but it still opened an empty PDF.
I noticed a post on Focal Point from August, 2013 where user linnex says EDAGET doesn't work for binary-type files, such as PDF.
Thanks,
~Mark
WebFocus Client 7.703 WebFocus Reporting Server 7.705 Windows Server 2008 R2 Dev Studio 7.703 Apache Tomcat/6.0.20 Excel, PDF IWAY DM Server 7.705 DataMigrator 7.705
Posts: 27 | Location: Maryland | Registered: March 09, 2006
I tried -WINNT, but I don't see much difference from when I use -DOS. It either says "EDA no data", or it just keeps waiting to do something in the browser until I kill it.
Thanks,
~Mark
WebFocus Client 7.703 WebFocus Reporting Server 7.705 Windows Server 2008 R2 Dev Studio 7.703 Apache Tomcat/6.0.20 Excel, PDF IWAY DM Server 7.705 DataMigrator 7.705
Posts: 27 | Location: Maryland | Registered: March 09, 2006
I'm trying to create a .fex which, when run, will open an existing (non-WebFocus) PDF.
I think there's a semantics issue here. What do you mean when you say the fex should "open" the existing PDF?
There's really nothing much the fex (running on the WFRS) can do to interpret the PDF's contents.
Or do you mean you want the fex to cause the PDF file to open in the browser? For that, the fex just needs to return a result page with an appropriate link to the PDF, and leave it to the browser to request the content.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I tried EDAGET with an externally created PDF file and it does not work, however it does work with a PDF generated by WF. It also works with other binary files like PNG or GIF images:
EX EDAGET PNG,baseapp/edaget_test,b
EX EDAGET PDF,baseapp/edaget_test2,b
EX EDAGET XML,baseapp/edaget_test,t
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
I'd like the "fex to cause the PDF file to open in the browser." I'm thinking the key to your suggestion is "appropriate" link. In other situations in other focexecs, I've used forward slashes, backward slashes, full path, abbreviated path..... but none of that is working here.
Going back to my original post, I can use the START command to open the PDF from the DOS window. In other focexecs, I can use the DOS COPY command to copy files. But I haven't figured out the correct syntax to use the DOS START command in a focexec.
Thanks,
~Mark
WebFocus Client 7.703 WebFocus Reporting Server 7.705 Windows Server 2008 R2 Dev Studio 7.703 Apache Tomcat/6.0.20 Excel, PDF IWAY DM Server 7.705 DataMigrator 7.705
Posts: 27 | Location: Maryland | Registered: March 09, 2006
Bummer. The PDF's I'm trying to open were not created by WF.
Thanks,
~Mark
WebFocus Client 7.703 WebFocus Reporting Server 7.705 Windows Server 2008 R2 Dev Studio 7.703 Apache Tomcat/6.0.20 Excel, PDF IWAY DM Server 7.705 DataMigrator 7.705
Posts: 27 | Location: Maryland | Registered: March 09, 2006
That did it! It works great. I added my code to the .fex, which runs before the PDF is open (to log when users run a focexec) and that works fine.
I don't know too much about html coding (though, I've had to learn some due to how the GUI doesn't always work too well in Dev Studio).
I don't seem to remember how to make a comment, but I guess < !-- and --> must be the start and end of a comment because I removed what you had in there. I guess you were showing me other examples of how to show the path of the PDF.
Thanks,
~Mark
WebFocus Client 7.703 WebFocus Reporting Server 7.705 Windows Server 2008 R2 Dev Studio 7.703 Apache Tomcat/6.0.20 Excel, PDF IWAY DM Server 7.705 DataMigrator 7.705
Posts: 27 | Location: Maryland | Registered: March 09, 2006
Mark, yes, you have it right - those are the start and end comment HTML tags. I put those in there to show other examples - maybe you need to embed a WebFOCUS parameter value in the file name...
I'm glad this worked for you.
The only problem I see with this method is that quite often people do not have a way to get the PDF file to the web server, which in your case is not an issue.
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
The only problem I see with this method is that quite often people do not have a way to get the PDF file to the web server, which in your case is not an issue.
If this is needed I'd suggest PSCP.EXE (download for free from the PuTTY website. Works great for Windoze -> Linux environments.
If you're in a two-tier environment, the PDF is on the reporting server and the URL references the web server. If possible, on the web server you can map a drive pointing to the reporting server. Or try using EDAGET.
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
Did you have any suggestions for destroying the file after its been sent to the client? I don't want to leave these files to live out there in perpetuity. My current thought process is to clean up the RS as soon as the file has been copied to the web server, and then run a shell script with cron to destroy any file older then 5 minutes in my destination folder on the web server... but I'd like something cleaner.
Any thoughts?
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
-* File: IBFS:/Dev/WFC/Repository/Vendor/Doug/OpenPDF.fex Created by WebFOCUS AppStudio
-* Douglas Lee, AKA: WebFOCUS Doug
TABLE FILE CAR
HEADING CENTER
"Can we open a PDF from within a fex?"
"Yes, We can do that in WebFOCUS!"
BY CAR.ORIGIN.COUNTRY AS ''
WHERE COUNTRY NE COUNTRY
ON TABLE SET EMPTYREPORT ON
ON TABLE NOTOTAL
ON TABLE SET STYLE *
GRID=OFF, BORDER=OFF,$
TYPE=HEADING, LINE=1, URL=http://www.thefamilee.net/DEL/Resume%20of%20Douglas%20Lee.pdf, target=new,$
TYPE=HEADING, LINE=2, URL=HTTP://TheFamiLee.net/CharicatureOfDouglasLee.jpg, target=new,$
ENDSTYLE
END