I would like to have drill down on 1 field's data and have multiple requests to run.
TABLE FILE COUNTRY
BY COUNTRY
END
As an example, when clicked on country data, I want to open google.com in 1 window, yahoo.com, in 1 window and run 1 report for clicked country in one iframe. Is this possible? I am aware of adding multiple drill menu items but this is different I believe. One click to run multiple requests. Please suggest.
Thank you.This message has been edited. Last edited by: FP Mod Chuck,
8.1.05 HTML,PDF,EXL2K, Active, All
August 27, 2017, 05:25 PM
David Briars
You might want to try using the JAVASCRIPT StyleSheet attribute, to open n windows from one WebFOCUS HTML report link..
-*
-* Create Main Report.
-*
TABLE FILE CAR
"Main Report"
SUM SALES/D9C
BY COUNTRY
ON TABLE HOLD AS HLDMNRPT FORMAT HTMTABLE
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLESHEET *
INCLUDE = ENInformationBuilders_Light1, $
TYPE=TITLE, JUSTIFY=CENTER, $
TYPE=DATA, COLUMN=COUNTRY, JAVASCRIPT=fn_drilldown(COUNTRY), COLOR=BLUE,$
ENDSTYLE
END
-RUN
-*
-* Report Presentation.
-*
-HTMLFORM BEGIN NOEVAL
<!DOCTYPE html>
<head>
<TITLE>Main Report</TITLE>
<script language='javascript'>
// Set window properties.
var WProps1 = new String("location=no,toolbar=no,directories=no");
WProps1 += ",scrollbars=yes,menubar=no";
WProps1 += ",status=no,resizable=yes,top=100,left=10,width=300, height=580";
var WProps2 = new String("location=no,toolbar=no,directories=no");
WProps2 += ",scrollbars=yes,menubar=no";
WProps2 += ",status=no,resizable=yes,top=100,left=500,width=500, height=580";
//
// Function: fn_drilldown
// Purpose : Call Drill Down Report.
//
function fn_drilldown(country) {
// Create a random number.
var rand = 0;
rand = Math.round(Math.random() * 100000);
drilldownurl = '/ibi_apps/WFServlet?IBIAPP_app=mashups&IBIF_ex=drilldownreport.fex&COUNTRY=' + country + '&RND=' + rand.toString();
// Open the detail report in a new window.
window.open(drilldownurl, "", WProps1);
// Open FocalPoint in a new window.
window.open("https://forums.informationbuilders.com/eve/forums/a/frm/f/7971057331","", WProps2);
}
</SCRIPT>
</HEAD>
<BODY>
!IBI.FIL.HLDMNRPT;
</BODY>
</HTML>
-HTMLFORM END
-* File drilldownreport.fex
TABLE FILE CAR
"Drill Down Report"
"Country => &COUNTRY"
SUM SALES/D9C
BY CAR
BY MODEL
WHERE COUNTRY EQ '&COUNTRY'
ON TABLE SET PAGE NOPAGE
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
INCLUDE = ENInformationBuilders_Light1, $
TYPE=REPORT, TITLETEXT='Drill Down Report',$
TYPE=TITLE, JUSTIFY=CENTER,$
ENDSTYLE
END
September 05, 2017, 08:20 PM
Enigma006
David, this worked for me when running independently. But my main report will run on a parameter driven HTML page. Parameter names are START_DATE, END_DATE and TRACK. So, I changed the code to this.
But parameters are not being passed. Am I doing something wrong?
Please suggest.
quote:
Originally posted by David Briars: You might want to try using the JAVASCRIPT StyleSheet attribute, to open n windows from one WebFOCUS HTML report link..
-*
-* Create Main Report.
-*
TABLE FILE CAR
"Main Report"
SUM SALES/D9C
BY COUNTRY
ON TABLE HOLD AS HLDMNRPT FORMAT HTMTABLE
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLESHEET *
INCLUDE = ENInformationBuilders_Light1, $
TYPE=TITLE, JUSTIFY=CENTER, $
TYPE=DATA, COLUMN=COUNTRY, JAVASCRIPT=fn_drilldown(COUNTRY), COLOR=BLUE,$
ENDSTYLE
END
-RUN
-*
-* Report Presentation.
-*
-HTMLFORM BEGIN NOEVAL
<!DOCTYPE html>
<head>
<TITLE>Main Report</TITLE>
<script language='javascript'>
// Set window properties.
var WProps1 = new String("location=no,toolbar=no,directories=no");
WProps1 += ",scrollbars=yes,menubar=no";
WProps1 += ",status=no,resizable=yes,top=100,left=10,width=300, height=580";
var WProps2 = new String("location=no,toolbar=no,directories=no");
WProps2 += ",scrollbars=yes,menubar=no";
WProps2 += ",status=no,resizable=yes,top=100,left=500,width=500, height=580";
//
// Function: fn_drilldown
// Purpose : Call Drill Down Report.
//
function fn_drilldown(country) {
// Create a random number.
var rand = 0;
rand = Math.round(Math.random() * 100000);
drilldownurl = '/ibi_apps/WFServlet?IBIAPP_app=mashups&IBIF_ex=drilldownreport.fex&COUNTRY=' + country + '&RND=' + rand.toString();
// Open the detail report in a new window.
window.open(drilldownurl, "", WProps1);
// Open FocalPoint in a new window.
window.open("https://forums.informationbuilders.com/eve/forums/a/frm/f/7971057331","", WProps2);
}
</SCRIPT>
</HEAD>
<BODY>
!IBI.FIL.HLDMNRPT;
</BODY>
</HTML>
-HTMLFORM END
8.1.05 HTML,PDF,EXL2K, Active, All
September 07, 2017, 08:40 AM
Enigma006
can anyone suggest on this plz?
8.1.05 HTML,PDF,EXL2K, Active, All
September 07, 2017, 10:31 AM
RSquared
Please do a search on drillmenuitem.
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
September 07, 2017, 10:59 AM
David Briars
quote:
...So, I changed the code to this. TYPE=DATA, COLUMN=N1, JAVASCRIPT=fn_drilldown(&START_DATE &END_DATE &TRACK), ...But parameters are not being passed. Am I doing something wrong?
Per the Creating Reports manual yes you can send amper variables via the JAVASCRIPT attribute.
The manual specifies that the amper variable be enclosed in single quotes.