In this section: |
How to: |
Reference: |
You can define a link from any report component to any URL including webpages, websites, Servlet programs, or non-World Wide Web resources, such as an email application. After you have defined a link, you can select the report component to access the URL.
The links you create can be dynamic. With a dynamic link, your selection passes the value of the selected report component to the URL. The resource uses the passed value to dynamically determine the results that are returned. You can pass one or more parameters. For details, see Creating Parameters.
TYPE=type, [subtype], URL=url[(parameters ...)], [TARGET=frame,] [ALT = 'description',] $
where:
Note:
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.
The description also displays as a pop-up description when your mouse or cursor hovers over the link in the report output.
The following example illustrates how to link to a URL from a report. The heading Click here to access the IB homepage is linked to the URL www.ibi.com. The relevant StyleSheet declarations are highlighted in the request.
Note that webserver indicates the name of the webserver that runs WebFOCUS.
TABLE FILE GGSALES ON TABLE SET PAGE-NUM OFF SUM UNITS AND DOLLARS BY CATEGORY BY REGION HEADING "Regional Sales Report" "Click here to access the IB homepage." " " ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1, URL=http://www.ibi.com, $ ENDSTYLE END
The output is:
When you click the link the site displays in your browser.
The following request is initiated from a browser session and runs a drill down report stored on the WebFOCUS Reporting Server.
This procedure is run from a browser, so the drilldown in the example is specified as a relative URL (it does not have protocol, host, or port) because it will be submitted using the protocol, host, and port of the current browser session.
Note: This technique is useful in a Managed Reporting procedure for creating a drill down to a WebFOCUS Server procedure. The FOCEXEC= technique for running a drill down procedure does not work because Managed Reporting always looks for the procedure in the Managed Reporting repository.
The main procedure is:
TABLE FILE GGSALES ON TABLE SET PAGE-NUM OFF SUM UNITS AND DOLLARS BY CATEGORY BY REGION HEADING "Regional Sales Report" " " ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ TYPE=DATA, COLUMN=REGION, URL=/ibi_apps/WFServlet?(IBIF_ex='ggdrill' AREA=REGION IBIC_server='EDASERVE' IBI_APPS='IBISAMP'),$ ENDSTYLE END
The drilldown report, which must be in application ibisamp, is:
-DEFAULTS ®ION='$*'; TABLE FILE GGSALES ON TABLE SET PAGE-NUM OFF SUM UNITS AND DOLLARS BY PRODUCT WHERE REGION = '&AREA' HEADING "Sales Report for Region &AREA" " " ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
The output of the main report is:
If you click the region Northeast, the output is:
TYPE=TITLE, URL=/test.asp?(A='2009%2F03'), $
How to: |
You can use the HYPERLINK-COLOR attribute to designate a color for a hyperlink within a report. This applies to all hyperlinks generated in the report. You can define a single color for the entire report or different colors for each individual element.
TYPE = type, HYPERLINK-COLOR = color
where:
Is the report component you wish to affect. You can apply this keyword to the entire report using TYPE=REPORT. The attribute can also individually be set for any other element of the report. For details, see Identifying a Report Component in a WebFOCUS StyleSheet.
Can use any style sheet supported color value designation. For available color values that can be utilized with the syntax, see Color Values in a Report.
The following PDF request illustrates how to define hyperlink colors for the entire report, as well as individual elements.
TABLE FILE GGSALES SUM DOLLARS/D12CM UNITS/D12C BY REGION BY CATEGORY HEADING "Hyperlinks of Many Colors" "" ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT, SQUEEZE=ON, FONT=ARIAL, GRID=OFF, COLOR=GREY, HYPERLINK-COLOR='SLATE BLUE',$ TYPE=DATA, COLUMN=UNITS, WHEN=REGION GE 'O', URL='http://www.ibi.com',$ TYPE=DATA, COLUMN=DOLLARS, COLOR=GREEN, HYPERLINK-COLOR='PURPLE',$ TYPE=DATA, COLUMN=DOLLARS, WHEN=REGION GE 'O', URL='http://www.ibi.com',$ ENDSTYLE END
The output is: