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 have a report in HTML that I would like to open in PDF for the user to print by clicking a print/pdf button. What am I missing in this cars database example to make that happen.
Basically, you'd need to use PDF as your output format and do your print there (PDF) once the PDF is created. You could do this via a drilldown on the word "export", which could reside in the HEADING which would, in turn, would pass a value of 'PDF' to your format variable. I did this while at USDA.
PS: Thanks a meg for providing a sample using the CAR file.
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
You don't use the WFFMT variable you're modifying anywhere in your fex. You should probably have -DEFAULT &WFFMT='HTML' and then replace ON TABLE PCHOLD FORMAT HTML with ON TABLE PCHOLD FORMAT &WFFMT
Doug's approach of providing a drill link is how I usually provide the option for them to get the report in PDF format.
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
Your PDF button can run your fex and generate in PDF format, but you need to dynamically change the output format using a variable. Your fex says ON TABLE PCHOLD FORMAT HTML so unless you change that to a variable you're never going to get PDF regardless of what your javascript does.
Additionally there are a bunch of other variables that need to be populated in your HTMLFORM that will be passed when your submit action is executed.
Your best solution lies in following what has already been suggested. Another option is to create a launch page that has a drop-down for the user to select the type of output they would like. This still requires the use of a variable in you fex and population of that variable via an HTML form.
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
OK,now I am concerned because the drill down to PDF seems to work when it wants to. If I run the cars database (displayed above) and click export it will open in PDF format. An hour or so later, if I run the same report and click export it will open itself in HTML format.Why the inconsistency?
Are you making the fex drill onto itself? If so try having a seperate fex to drilldown on.
Here the syntax for for a drilldown you might want to play with type and subtype. TYPE=type, [subtype], FOCEXEC=fex[(parameters ...)], [TARGET=frame,] $