Focal Point
[CLOSED] Download link - HTML Composer

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

May 01, 2017, 03:46 PM
BI_Developer
[CLOSED] Download link - HTML Composer
Hello

I have a HTML page with some drop down boxes and 4 iframes (4 graphs from 4 fex files). I would like to add a pdf download image link on top of each iframe which when clicked would open that particular fex/graph in new window in pdf format.

In trying to do this, I am having trouble in sending a parameter to each fex which could have a value 'PDF'. I created a hidden parameter with value PDF and linked to a amper variable in fex but it sends PDF value always. I need to send this only when PDF image is clicked but not when regular 'Submit' button is clicked. When 'Submit' is clicked usual JSCHART graphs need run.

Please suggest.

Thanks.

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


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
May 01, 2017, 03:55 PM
MartinY
Instead of having only one fex called with a different parameter value that should be "dynamic" but not really, perform as following.

Regular button call a fex that:
1- init parameter to HTML (or other format than PDF)
2- call the report fex

PDF button call a fex that:
1- init parameter to PDF
2- call the report fex


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 01, 2017, 04:01 PM
BI_Developer
quote:
Originally posted by MartinY:
Instead of having only one fex called with a different parameter value that should be "dynamic" but not really, perform as following.

Regular button call a fex that:
1- init parameter to HTML (or other format than PDF)
2- call the report fex

PDF button call a fex that:
1- init parameter to PDF
2- call the report fex


You want me to create 2 hidden parameters - 1 for the regular button sending HTML as value and 1 for pdf button sending PDF as value?

OR

Create 1 fex which would be called by both the buttons and in that fex give parameter a value?

Sorry, I did not quite understand your suggestion.

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


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
May 02, 2017, 11:19 AM
BI_Developer
Any suggestions are appreciated. Thank you.


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
May 02, 2017, 12:15 PM
MartinY
Not 2 hidden parameters, no hidden parameters at all.

Need 3 fex :
-* RegularCall.fex
-SET &WFFMT = 'HTML';
-INCLUDE <location>/report.fex

-* PDFCall.fex
-SET &WFFMT = 'PDF';
-INCLUDE <location>/report.fex

-* report.fex
-DEFAULTH &WFFMT = 'HTML'
TABLE FILE abc
SUM ...
BY ...
WHERE ...
ON TABLE PCHOLD FORMAT &WFFMT
...
END


Need 1 HTML with 2 buttons as you already have:

Button1 as for regular execution will call RegularCall.fex
Button2 as for PDF execution will call PDFCall.fex


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 02, 2017, 12:18 PM
BI_Developer
quote:
Originally posted by MartinY:
Not 2 hidden parameters, no hidden parameters at all.

Need 3 fex :
-* RegularCall.fex
-SET &WFFMT = 'HTML';
-INCLUDE <location>/report.fex

-* PDFCall.fex
-SET &WFFMT = 'PDF';
-INCLUDE <location>/report.fex

-* report.fex
-DEFAULTH &WFFMT = 'HTML'
TABLE FILE abc
SUM ...
BY ...
WHERE ...
ON TABLE PCHOLD FORMAT &WFFMT
...
END


Need 1 HTML with 2 buttons as you already have:

Button1 as for regular execution will call RegularCall.fex
Button2 as for PDF execution will call PDFCall.fex


I thought of this. But I have 4 iframes which are 4 different fex files. How to control which report to run from the calling fex is the problem I thought when thinking of this method. I mean if pdf button on iframe1 is clicked then run rep1, if pdf on iframe2 then rep2 etc.
-* RegularCall.fex
-SET &WFFMT = 'HTML';
-INCLUDE <location>/report1.fex
-INCLUDE <location>/report2.fex
-INCLUDE <location>/report3.fex
-INCLUDE <location>/report4.fex



WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
May 02, 2017, 12:26 PM
MartinY
Same technique.

Each button will have is own called fex with it's own parameter(s) and calling fex.

This is the simplest way I found without having to "play" around with HTML, java, jquerry, hidden parms and so on.

It's just a simple fex assignation to a button which is much more easy than anything else.
Also it doesn't "overload" your HTML with a tons of hidden parameters and coding that needs to be managed.

You then rely on fex coding and not anymore on HTML/java/jquery


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 02, 2017, 12:44 PM
Hank W.
So,

- when the page loads initially, you get a blank frame
- when you click "submit" button, you get a html report populating the frame

Now if you want that iframe as a pdf report, you would need to resubmit that iframe's fex call again with the same parameters to get the pdf, so you would run the fex again.

Or then you could run the report, until the final formatting, and return it in a html and pdf tab always. So you would run the queries etc and just duplicate the formatting bits... returning a html and pdf tab I haven't tried tbh.


Cheers,
H.

WebFOCUS 8.1.05M
Oracle 11g - DB2
RedHat