Creating Multiple Drill-Down Links

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. When the HTMTABLE format is used, special JavaScript coding is required.

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.


Top of page

x
Syntax: How to Create Multiple Drill-Down Links
TYPE=type, [subtype], DRILLMENUITEM='description'|'DrillDown n',
     type_of_link

where:

type
Identifies the report component that you select in the web browser to execute the link. The TYPE attribute and its value must appear at the beginning of the declaration.
subtype
Are any additional attributes, such as COLUMN, LINE, or ITEM, that are needed to identify the report component that you are formatting. See Identifying a Report Component in a WebFOCUS StyleSheet for information on identifying report components.
description
Is the text that appears on the pop-up menu of drill-down options on the report output. The default value is DrillDown n, where n is a consecutive integer, such as DrillDown 1, DrillDown 2, and so on.
type_of_link
Is the type of link, for example, a link to a detail report or URL. For a summary of valid values, see Summary of Drill-Down Links.

Top of page

x
Reference: Syntax Guidelines

If a multi-drill menu is tagged with the DRILL-SOURCE attribute, it indicates that the menu was generated by WebFOCUS and should be merged into the existing drilldowns added by the user for the specified report element, if any. The value of the attribute indicates which WebFOCUS feature generated the menu. This attribute is reserved for Information Builders internal use only.

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 style sheet 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.


Top of page

x
Reference: Summary of Drill-Down Links

You can link to:



Example: Creating Multiple Drill-Down Links

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 website; 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

Top of page

x
Applying Conditional Styling

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.



Example: Applying Conditional Styling to a Multiple Drill-Down Report

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:


WebFOCUS