Linking to a URL

How to:

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.


Top of page

x
Syntax: How to Link to a URL
TYPE=type, [subtype], URL=url[(parameters ...)], [TARGET=frame,] [ALT =  'description',] $

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. For information on identifying report components, see Identifying a Report Component in a WebFOCUS StyleSheet.
url
Identifies any valid URL, including a URL that specifies a WebFOCUS Servlet program, or the name of a report column enclosed in parentheses whose value is a valid URL to which the link will jump.

Note:

  • The maximum length of a URL=url argument, including any associated variable=object parameters, 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 URL argument can span more than one line, as described in Creating and Managing a WebFOCUS StyleSheet

    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.

  • If the URL refers to a WebFOCUS Servlet program that takes parameters, the URL must end with a question mark (?).

parameters
Values that are passed to the URL. For details, see Creating Parameters.
frame
Identifies the target frame in the webpage in which the output from the drill-down link is displayed. For details, see Specifying a Target Frame.
description
Is a textual description of the link supported in an HTML report for compliance with Section 508 accessibility. Enclose the description in single quotation marks.

The description also displays as a pop-up description when your mouse or cursor hovers over the link in the report output.



Example: Linking to a URL

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 http://www.ibi.com. The relevant StyleSheet declarations are highlighted in the request.

Note that webserver indicates the name of the webserver that runs WebFOCUS and Developer Studio.

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.



Example: Linking to a URL to Run a Drilldown WebFOCUS Server Procedure

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 &REGION='$*';
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:


WebFOCUS