Focal Point
DS HTML Composer: Use one html file for multiple reports

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

February 22, 2012, 01:40 PM
Francis Mariani
DS HTML Composer: Use one html file for multiple reports
Just wanted to know if it's proper to do the following:

I have 8 reports - each with parameter screens that are exactly the same - except that they launch the appropriate program.

These parameter screens are launched by calling a fex that has an HTMLFORM command to include the html file.

Would it be proper to set the report fex name in the fex and then include the same html file?

launch_parms1.fex -> parms.htm -> report1.fex
launch_parms2.fex -> parms.htm -> report2.fex
launch_parms3.fex -> parms.htm -> report3.fex

Would I be breaking GUI rules? Should I simply bang the fex name in the appropriate place or is there a preferable JS method?

Thanks,


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
February 22, 2012, 02:42 PM
j.gross
Plunking a !IBI reference where the name of the linked-to fex appears violates the GUI. But there's no need to resort to JavaScript.

Here's what I would do:

1. In each of the 8 stub fexes (for running the 8 respective reports), code:
-SET &ReportToRun= [an identifier for the corresponding report fex] ;

2. Set up a driver fex, that will branch on the value of &ReportToRun, to one of 8 coresponding -INCLUDE statements.

3. In the launch page,
(a) link the "report" to the driver fex.
(b) assign parameter "ReportToRun" to a hidden text control, and use !IBI.AMP.ReportToRun; as its value (that's supported in the GUI), thereby passing the value set up in each report's stub fex, to the HTML page, and from there to the driver fex.


That way the page's "report" fex is a real fex file, and Composer can expand it to discover its parameters.

When you link the page to the driver fex, Composer will scan the driver fex and all 8 referenced report fexes, compose a list of all the distinct amper variables referenced in the 9 fex files, and invite you to set up controls for them. That will cover both the report parameters (referenced in the underlying report fexes), and the control parameter ("ReportToRun") referenced in the driver.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
February 22, 2012, 03:22 PM
Francis Mariani
Jack,

Thanks for your response. Yes - I like the idea of a driver fex, so this sounds like a great solution.

There's one issue with this though: these reports can be run deferred, so with a driver fex, I wouldn't have the proper report name in the Deferred Reports list. I need to research this a bit - I'm sure people have asked Tech Support or FocalPoint about how to customize the deferred report name.

Cheers,


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