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 JCThis 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.
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.
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.
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