In this section: How to: Reference: |
You can create multiple drill-down links from a component on a summary report, chosen from any combination of supported actions. For example, you can create links to a detail report or Maintain procedure, a JavaScript function, and a URL. When you click a component in the summary report, a pop-up menu appears listing the drill-down options.
This feature is available for HTML reports and the HTMTABLE format. It applies to data fields in the body of the report, not to headings, subheadings, footings, or subfootings. When the HTMTABLE format is used, special JavaScript coding is required. For more information, see Saving a Drill-Down Report to a Server With HTMTABLE.
Developer Studio has an interface that automatically generates the code. For details, see the topic on creating a multiple drill-down procedure in the Creating Reporting Applications With Developer Studio manual.
TYPE=type, [subtype], DRILLMENUITEM='description'|'DrillDown n', type_of_link
where:
When you create multiple drill-down links, you cannot specify a single drill-down action (for example, FOCEXEC or URL) before the first DRILLMENUITEM.
The menu created by the DRILLMENUITEM keyword is styled using a Cascading Stylesheet file. The file is /ibi/WebFOCUSxx/ibi_apps/ibi_html/javaassist/ibi/html/js/multidrill.css, where xx is the version and major release number of WebFOCUS.
You can make changes to this file to affect the font, size, and color of the DRILLMENUITEM menu. Tip: Make a backup of this file before modifying it.
You can link to:
Note that the length of the URL is limited by the maximum number of characters allowed by the browser. For information about this limit for your browser, search on your browser vendor’s support site.
In this example, the Developer Studio Report Painter was used to create two procedures: a summary report and a detail report. The summary report uses the DRILLMENUITEM and URL attributes to create a link to a Web site; and the DRILLMENUITEM and FOCEXEC attributes to create a link to the detail report, as shown in boldface in the code.
Notice that any StyleSheet syntax that applies to a report component as a whole precedes the first instance of DRILLMENUITEM. For example, COLOR='BLUE' and STYLE=UNDERLINE apply to the color and underlining of text in the component, not to a particular drill-down action. For information about editing the menu styles, see Syntax Guidelines.
For information on creating a multiple drill-down report using Developer Studio, see the Creating Reporting Applications With Developer Studio manual.
Summary Report:
TABLE FILE GGSALES SUM DOLLARS/D12.2CM BUDDOLLARS/D12.2CM BY ST ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SET ONLINE-FMT HTML ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE * UNITS=IN, PAGESIZE='SCREEN', LEFTMARGIN=0.000000, RIGHTMARGIN=0.000000, TOPMARGIN=0.000000, BOTTOMMARGIN=0.000000, SQUEEZE=ON, ORIENTATION=PORTRAIT,$
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, TOPGAP=0.013889, BOTTOMGAP=0.027778,$
TYPE=DATA,
COLUMN=N1,
COLOR='BLUE',
STYLE=UNDERLINE,
DRILLMENUITEM='DrillDown 1',
URL=http://www.informationbuilders.com,
DRILLMENUITEM='DrillDown 2',
FOCEXEC=DETAILREPORT(PARAMETER=N1),$
TYPE=TITLE, STYLE=BOLD,$
TYPE=TITLE,
COLUMN=N1,
COLOR='BLUE',
STYLE=BOLD+UNDERLINE,
DRILLMENUITEM='DrillDown 1',
URL=http://www.informationbuilders.com,
DRILLMENUITEM='DrillDown 2',
FOCEXEC=DETAILREPORT(PARAMETER=N1),$
TYPE=TABHEADING, SIZE=12, STYLE=BOLD,$
TYPE=TABFOOTING, SIZE=12, STYLE=BOLD,$
TYPE=HEADING, SIZE=12, STYLE=BOLD,$
TYPE=FOOTING, SIZE=12, STYLE=BOLD,$
TYPE=SUBHEAD, SIZE=10, STYLE=BOLD,$
TYPE=SUBFOOT, SIZE=10, STYLE=BOLD,$
TYPE=SUBTOTAL, BACKCOLOR=RGB(210 210 210),$
TYPE=ACROSSVALUE, SIZE=9,$
TYPE=ACROSSTITLE, STYLE=BOLD,$
TYPE=GRANDTOTAL, BACKCOLOR=RGB(210 210 210), STYLE=BOLD,$
ENDSTYLE END
Detail Report:
TABLE FILE GGSALES PRINT DOLLARS/D12.2CM BUDDOLLARS/D12.2CM BY ST WHERE (ST EQ '&PARAMETER');
ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SET ONLINE-FMT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, PAGESIZE='SCREEN', LEFTMARGIN=0.000000, RIGHTMARGIN=0.000000, TOPMARGIN=0.000000, BOTTOMMARGIN=0.000000, SQUEEZE=ON, ORIENTATION=PORTRAIT,$
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, TOPGAP=0.013889, BOTTOMGAP=0.027778,$
TYPE=TITLE, STYLE=BOLD,$
TYPE=TABHEADING, SIZE=12, STYLE=BOLD,$
TYPE=TABFOOTING, SIZE=12, STYLE=BOLD,$
TYPE=HEADING, SIZE=12, STYLE=BOLD,$
TYPE=FOOTING, SIZE=12, STYLE=BOLD,$
TYPE=SUBHEAD, SIZE=10, STYLE=BOLD,$
TYPE=SUBFOOT, SIZE=10, STYLE=BOLD,$
TYPE=SUBTOTAL, BACKCOLOR=RGB(210 210 210),$
TYPE=ACROSSVALUE, SIZE=9,$
TYPE=ACROSSTITLE, STYLE=BOLD,$
TYPE=GRANDTOTAL, BACKCOLOR=RGB(210 210 210), STYLE=BOLD,$
ENDSTYLE END
You can apply conditional styling to a report component, using a phrase such as WHEN, and use it to select one of a number of different actions, depending on the value of fields in the report.
The WHEN condition must precede the DRILLMENUITEM syntax.
For details on creating conditions, see Linking With Conditions.
Add the following boldface code to the sample summary report in Creating Multiple Drill-Down Links. Notice that the WHEN condition precedes the code for DRILLMENUITEM, as required.
When you run the summary report, the State field is in red instead of blue whenever budget dollars is greater than dollar sales, and the pop-up menu of drill-down options shows Detail Budget Report instead of DrillDown 1 and DrillDown 2.
. . . TYPE=DATA, COLUMN=N1, COLOR='BLUE', STYLE=UNDERLINE, DRILLMENUITEM='DrillDown 1', URL=http://www.informationbuilders.com?, DRILLMENUITEM='DrillDown 2', FOCEXEC=DETAILREPORT(PARAMETER=N1),$
TYPE=DATA,
COLUMN=N1,
COLOR='RED',
STYLE=UNDERLINE,
WHEN=BUDDOLLARS GT DOLLARS,
DRILLMENUITEM='Detail Budget Report',
FOCEXEC=DETAILREPORT(PARAMETER=N1),$.
.
.
Sample output is:
How to: |
Instead of displaying report output immediately to your browser, you can save a report to a server and use it to perform additional processing. When you specify the HTMTABLE format to save a drill-down report to a reporting server, JavaScript coding is required. Specific JavaScript code must be included in the output file to identify the server location where the HTMTABLE is saved.
It is necessary to add JavaScript code to the output file created with the -HTMLFORM command when both the DRILLMENUITEM attribute and the HTMTABLE format are used to create a report containing one or more drill-down links.
In the output file, add the appropriate paths to the following attributes.
BASE HREF = http://machine:port/approot/appname/ var focexurl = dir?var&IBIC_server=reportserv&IBIAPP_app=appname&
where:
IBIF_webapp=/ibi_apps
TABLE FILE GGSALES . . . ON TABLE HOLD FORMAT HTMTABLE AS REPORT1 . . . TYPE=DATA, COLUMN=N1, COLOR='BLUE', STYLE=UNDERLINE, DRILLMENUITEM='DrillDown 1', URL=http://www.informationbuilders.com?, DRILLMENUITEM='DrillDown 2', FOCEXEC=DETAILREPORT(PARAMETER=N1),$ . . . END -HTMLFORM output.HTM
The output.HTM file contains the following JavaScript statements:
<HTML> <TITLE>FOCUS Report</TITLE> <BASE HREF="http://localhost:80/approot/IBISAMP/"> <script language='javascript'> var ibiOptions = new Array("multidrill"); var focexurl = "/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE& IBIAPP_app=IBISAMP& BIAPP_app=IBISAMP&"; var fochtmlurl = "/ibi_apps/ibi_html"; </script> <script language='javascript' src='/ibi_apps/ibi_html/javaassist/nls/js'> </script> <script language='javascript'src='/ibi_apps/ibi_html/javaassist/ibi/html/js/ibigbl.js'> </script> <script language='javascript'> ibigblloadCss(null); </script> !IBI.FIL.REPORT1;
WebFOCUS |