Focal Point
[CLOSED] Launch multiple drilldown from fex

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

September 17, 2012, 03:09 PM
jcdavoine
[CLOSED] Launch multiple drilldown from fex
Hi,
I created an HTML with a primary fex and I want to drive few drilldown at once.
Right now I have a do a multiple drilldown and click on each of them to populate the frames.
Thanks
JC

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


WF 7.7.03
Windows, all output
September 17, 2012, 03:39 PM
Mighty Max
You want a hyperlink that has two targets. You would need to come up with something in javascript to do this. I don't think a hyperlink can have two targets with standard HTML.
If you are building the reports in the GUI. Then you should use the Drilldown Menu that IBI provides.
Also read this post.
Drill-down link to multiple frames
Basically you will execute one fex that builds two HTMTABLE hold files and use them in a -HTMLFORM.


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
September 18, 2012, 08:18 AM
jcdavoine
Thanks.
I was able to put 2 fex in one fex and run them with the HTMLFORM.
Now, how do I direct each HOLD to different exsiting iframes?


WF 7.7.03
Windows, all output
September 18, 2012, 04:14 PM
Mighty Max
In the main html page I would create a hidden iframe. I would target the drilldown report to load in the hidden iframe. In the drilldown fex in the -HTMLFORM section I would write some javascript to load the two iframes in the main html page.


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
September 19, 2012, 11:32 AM
Todd_Wallace
Could you use the document format to do this? I have seen demo's where they add multiple reports to a single document and drive them all by a single combo box. The trick is that they all have as the first by field the one that drives them. If you have more than one param then that might add some complexity but it seems like you could put a couple of reports in there and look at the code of how they do it pretty easily.


WebFOCUS 8.1.05
Windows-iSeries DB2, All Outputs
HTML
September 19, 2012, 02:39 PM
jcdavoine
I am trying to make this work with this code in the source fex.
What should the hidden frame contain?
Let me know and thanks for the help.
-HTMLFORM BEGIN
<html>
<head>
</head>
<body>
<form method="POST" target="iframe3" action="/ibi_apps/WFServlet">
<INPUT TYPE="hidden" NAME="IBIF_ex" VALUE="metertable">
!IBI.FIL.METERTABLE;
</form>

<form method="POST" target="iframe4" action="/ibi_apps/WFServlet">
<INPUT TYPE="hidden" NAME="IBIF_ex" VALUE="metertrend">
!IBI.FIL.METERTREND;

</form>
</body>
</html>




WF 7.7.03
Windows, all output
September 19, 2012, 04:03 PM
Mighty Max
I am not an expert in Javascript. I use StackOverflow a lot for ideas. Looks like you want to submit forms in order to execute your drilldown fexes. Here is a sample that accomplishes that.

  
-* File main.fex
-* MAIN REPORT

TABLE FILE CAR
PRINT
    COUNTRY
    CAR
    MODEL

HEADING
""

FOOTING
""

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS HRPT1 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=DATA,
     COLUMN=COUNTRY,
     JAVASCRIPT=drillReport(COUNTRY),
$
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<html>
<head>
<script type="text/javascript">
function drillReport(input){
//Set country
var country = input;
document.getElementById("COUNTRY").value = country;

//Submit first drilldown
document.getElementById("IBIF_ex").value = "metertable";
var frm = document.getElementById("frm");
frm.setAttribute("target","iframe1");
frm.submit();

//Submit second drilldown
document.getElementById("IBIF_ex").value = "metertrend";
var frm = document.getElementById("frm");
frm.setAttribute("target","iframe2");
frm.submit();
}
</script>
</head>
<body>
<div>
!IBI.FIL.HRPT1;
</div>
<form id="frm" name="frm" method="post" target="" action="/ibi_apps/WFServlet">
<input type="hidden" id="IBIF_ex" name="IBIF_ex" value="">
<input type="hidden" id="COUNTRY" name="COUNTRY" value="">
</form>
<iframe id="iframe1" name="iframe1"></frame>
<iframe id="iframe2" name="iframe2"></frame>
</body>
</html>
-HTMLFORM END



-* File metertable.fex
-* DRILLDOWN REPORT 1

TABLE FILE CAR
PRINT
     RETAIL_COST
BY CAR
WHERE COUNTRY EQ '&COUNTRY';
END

-* File metertrend.fex
-* DRILLDOWN REPORT 2

GRAPH FILE CAR
PRINT
     RETAIL_COST
BY CAR
WHERE COUNTRY EQ '&COUNTRY';
END



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
November 15, 2013, 04:40 PM
Mmahadik
I copied above code in 3 different files
app/main.fex
app/metertable.fex
app/metertrend.fex

but when i click on any country in it says 'the foxexe procedure can not be found: app/metertrend'

it gives error for both files. any idea why this should happen?


WebFOCUS 7.6
Windows, All Outputs