How to: |
Reference: |
A link allows you to drill down to a report for more details or execute a procedure by selecting a designated hot spot (the link) in the report. By linking reports you provide easy access to more detailed data that supplements the information in your base report. The drill-down report can contain information that is either independent of the data in the base report or depends and expands on a specific data value in the base report.
To create a link, you must have a report to link from (the base report) and a report to link to (the drill-down report). If the drill-down report depends on a specific data value in the base report, you also need to pass that value to the drill-down report by creating parameters. For details, see Creating Parameters.
TYPE=type, [subtype], FOCEXEC=fex[(parameters ...)], [TARGET=frame,] [ALT = 'description',] $
where:
Note: The procedure cannot be named NONE (all uppercase). Using NONE as the procedure name will result in a syntax error. Mixed or lowercase is allowed.
To determine the file name in WebFOCUS, see How to Determine a WebFOCUS File Name in Managed Reporting.
The maximum length of a FOCEXEC=fex argument, including any associated parameters, is 2400 characters. The FOCEXEC argument can span more than one line, as described in Creating and Managing a WebFOCUS StyleSheet.
The description also displays as a pop-up description when your mouse or cursor hovers over the link in the report output.
When going back to the original report from a drilldown report in PDF format, you must click the Back button twice quickly. The alternative is to use the drop-down list presented to the right of the Back button to view the browser history and select the link two steps back. The first history item will point to the redirection page and be titled based on the method used to access the WFServlet. The previous item will be titled WebFOCUS Report and will point back to the original PDF report.
The following report request summarizes product sales and sorts the data by region, state, and store code. The store code also displays in the subfootings where links to detailed reports about the store's sales (by product or by date) display. Each line of the subfoot contains two text objects and one embedded field. The relevant StyleSheet declarations are highlighted in the request.
The main report is:
TABLE FILE GGSALES HEADING "Sales Report" SUM DOLLARS/I08M BY REGION BY ST BY STCD ON STCD SUBFOOT "View Store <STCD Sales By Product" " " "View Store <STCD Sales By Date" ON REGION PAGE-BREAK ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=HEADING, SIZE=12, STYLE=BOLD, $ TYPE=SUBFOOT, LINE=1, OBJECT=TEXT, ITEM=2, COLOR=GREEN, FOCEXEC=PRDSALES(STOREID=STCD), $ TYPE=SUBFOOT, LINE=3, OBJECT=TEXT, ITEM=2, COLOR=BLUE, FOCEXEC=HSTSALES(STOREID=STCD), $ ENDSTYLE END
Using StyleSheet declarations, the subfoot phrase Sales By Product links to a second procedure named PRDSALES and passes it the value of STCD displayed in the subfoot. The subfoot phrase Sales By Date links to a procedure named HSTSALES and passes it the value of STCD displayed in the subfoot.
The request for the linked report HSTSALES is:
TABLE FILE GGSALES SUM UNITS BY STCD BY DATE WHERE STCD = '&STOREID' ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
The request for the linked report PRDSALES is:
TABLE FILE GGSALES SUM UNITS BY STCD BY PRODUCT WHERE STCD = '&STOREID' ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
The first page of output for the main report follows. If you select Sales By Product for Store R1020, the value R1020 is passed to the PRDSALES procedure. If you select Sales By Date for Store R1019, the value R1019 is passed to the HSTSALES procedure.
The output is:
If you click the Sales By Product link for store R1020, the output is:
Store ID |
Product |
Unit Sales |
R1020 |
Biscotti |
29413 |
Coffee Grinder |
19339 |
|
Coffee Pot |
15785 |
|
Croissant |
43300 |
|
Espresso |
32237 |
|
Latte |
77344 |
|
Mug |
30157 |
|
Scone |
45355 |
|
Thermos |
14651 |