Focal Point
[SOLVED] HTML launch page, running a csv output and pdf output at the same time

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5737010695

December 28, 2010, 08:43 AM
MAdams1
[SOLVED] HTML launch page, running a csv output and pdf output at the same time
I'm not sure this is possible but I hope someone out there has done it before and can help me out. I have a fex that runs address labels to a csv output and another fex that does the same thing but to pdf output. I currently have two launch pages, one for each fex. I want to have one launch page that will run the csv and then the pdf. Oh and in between there is an html form that displays a message that the csv file has been created. If I run the csv and then the form displays with the csv message, how do I get it to then clear the report and display the pdf output. This needs to be done with one submit button click. Thanks for any help.

This message has been edited. Last edited by: Kerry,


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
December 28, 2010, 09:24 AM
<JG>
quote:
Oh and in between there is an html form that displays a message that the csv file has been created.


option 1. Add a button to the form that runs the PDF, not one click as it requires a user to click it.
option 2. Add an onOpen function to automatically submits the PDF request.
Use javascript to keep the CSV created message on the calling page.
December 28, 2010, 10:17 AM
MAdams1
JG
I thought about adding a button, but really wanted it to just "magically" happen. I'm not sure how to do the onOpen function. Is this an ibirls function? Or something I would code? If so, is there a way to delay the running of the PDF fex so the csv message can be read then continue on to display the pdf?


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
December 28, 2010, 11:53 AM
<JG>
Sorry I meant onLoad.

Here is an example. it waits 5 seconds then runs the report

 
TABLE FILE CAR
SUM DCOST
BY COUNTRY
ON TABLE HOLD AS CSVFILE FORMAT COM
END
-RUN
-HTMLFORM BEGIN
<html>
  <head> 
  </head>  <body onload="window.setTimeout('document.form1.submit()',5000);">
  <FORM  NAME=form1 ACTION="/ibi_apps/WFServlet" METHOD="POST",target="_blank"  >
  <INPUT TYPE="hidden" NAME="IBIF_ex" VALUE="CARINST">
CSV Created
</FORM>
</body>
</html>
-HTMLFORM END 

December 28, 2010, 03:43 PM
MAdams1
JG, I couldn't get this to work. Every time I added the onload in the body, my page was stuck in the "loading pleas wait" splash. But I figured out a work around where it runs the csv report, I just display an alert msg(instead of html form csv msg) then it runs/displays the PDF report. Works. Thanks for the help.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML