Focal Point
[HOW-TO] Multi-drill-down to different Targets

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

May 01, 2007, 08:20 PM
Francis Mariani
[HOW-TO] Multi-drill-down to different Targets
Here's one way to get multi-drill-downs to run in different target windows.

The idea is to use a JAVASCRIPT call in the multi-drill-down Style-sheet code that builds the fex call instead of making a FOCEXEC call .

The JavaScript variable focexurl is generated automatically by WebFOCUS.

In the example below, I am passing the target name to the drill-down fex only to put it in the report HEADING for demo purposes - it is not necessary.

Fex: multidrill3.fex

-SET &ECHO=ALL;

TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY MODEL
HEADING
"MULTIDRILL3"
ON TABLE SET ONLINE-FMT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=TITLE, STYLE=BOLD, $
TYPE=DATA, COLUMN=COUNTRY,
DRILLMENUITEM='Drilldown 1',
JAVASCRIPT=RunReportDD('MULTIDRILL3DD1' 'TARGET1' COUNTRY),
DRILLMENUITEM='Drilldown 2',
JAVASCRIPT=RunReportDD('MULTIDRILL3DD2' 'TARGET2' COUNTRY),
$
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<SCRIPT language='javascript'>
function RunReportDD(vFex, vTarget, vCountry)
{
vReportURL = focexurl + 'IBIF_ex=' + vFex + '&|COUNTRY=' + vCountry + '&|TARGET=' + vTarget;

// Construct the Report window's features
vFeatures =
"channelmode=no, directories=no, fullscreen=no, " +
"location=yes, menubar=yes, resizable=yes, scrollbars=yes, " +
"status=yes, titlebar=yes, toolbar=yes, "
"left=0, top=0, width=" + screen.availWidth + ", height=" + screen.availHeight;

vTarget = window.open(vReportURL, vTarget, vFeatures);
vTarget.focus();
}
</SCRIPT>
-HTMLFORM END

Fex: multidrill3dd1 and multidrill3dd2:

-SET &ECHO=ALL;

TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY MODEL
WHERE COUNTRY EQ '&COUNTRY'
HEADING
"MULTIDRILL3DD1 / &TARGET"
ON TABLE SET ONLINE-FMT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=TITLE, STYLE=BOLD, $
ENDSTYLE
END
-RUN

This message has been edited. Last edited by: Francis Mariani,


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
May 02, 2007, 08:50 AM
<Tim Howard_ABCBS>
Great job. Thanks for sharing, that could be very useful. I'm finding being able to call javascript functions from a drilldown to be a very powerful tool. There's lots of cool stuff that can be done, such as you've shown.
March 05, 2013, 04:24 AM
Trilochan
I was looking for this type of works.

Well done.

Thanks for sharing.


WebFOCUS 7.6.1
Windows, All Outputs
March 05, 2013, 03:43 PM
Francis Mariani
Glad to see this technique was useful to someone!


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
March 07, 2013, 01:19 PM
J
This is great. A different example with text is in the Techinical memo 4701, although Francis's is much easier to understand.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs