Linking From a Graphic Image

How to:

You can link to a report or procedure from an image in an HTML report. The image can be attached to the entire report or to the report heading or footing (this includes table headings/table footings, and sub-headings/sub-footings).

The syntax for linking from a graphic image is the same as for linking from a report component. The only difference is adding IMAGE=image to the StyleSheet declaration.

Note: You can only link to a report or procedure from an image when you are using HTML format.

Syntax: How to Specify Links From a Graphic Image

To specify a link from an image in a report or procedure use:

TYPE=type, [subtype], IMAGE=image, FOCEXEC=fex 
   [(parameters ...)],[TARGET=frame,] $

To specify a link from an image in an URL use:

TYPE=type, [subtype], IMAGE=image, URL=url 
   [(parameters ...)],[TARGET=frame,] $

To specify a link from an image in a JavaScript function use:

TYPE=type, [subtype], IMAGE=image, JAVASCRIPT=function 
   [(parameters ...)],$

where:

type
Identifies the report component that the user selects to execute the link. The TYPE attribute and its value must appear at the beginning of the declaration. You can specify the following types of components:

REPORT enables you to drill down from a graphical image that is attached to the entire report.

TABHEADING or TABFOOTING enables you to drill down from a graphical image that is attached to a report heading or footing.

HEADING or FOOTING enables you to drill down from a graphical image that is attached to a page heading or footing.

SUBHEAD or SUBFOOT enables you to drill down from a graphical image that is attached to a sub heading or sub footing.

Report components are described in Identifying a Report Component in a WebFOCUS StyleSheet.

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.
image
Specifies the file name of a graphical image file. The image must exist as a separate graphic file in a format that your browser supports. Most browsers support GIF and JPEG file types.

You can specify a local image file, or identify an image elsewhere on the network using a URL. URLs can be absolute, such as, http://www.ibi.com/graphic.gif, or relative alias that can be identified to the application server or web server, such as, /ibi_apps/ibi_html/ibi_logo.gif.

Alternatively, you can specify an alphanumeric field in the report (either a BY sort field or a display field) whose value corresponds to the name of the image file. For information about using StyleSheets to incorporate and position graphical images in a report, see Laying Out the Report Page.

fex
Identifies the file name of the linked procedure to run when the user selects the report component. For details about linking to another procedure, see Linking to Another Report.
url
Identifies any valid URL, or the name of a report column enclosed in parentheses whose value is a valid URL. For details about linking to an URL, see Linking to a URL.
function
Identifies the JavaScript function to run when the user selects the report component. For details about calling a JavaScript function, see Linking to a JavaScript Function.
parameters
Are values that are passed to the report, URL, or JavaScript function. You can pass one or more parameters. The entire string of parameters must be enclosed in parentheses, and separated from each other by a blank space. 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.

Note: You cannot specify a target frame if you are executing a JavaScript function. However, the JavaScript function itself can specify a target frame for its results.

Example: Specifying a Link From an Image

The following example illustrates how to link a report from an image. The relevant StyleSheet declarations are highlighted in the request.

Main report:

TABLE FILE EMPLOYEE
PRINT LAST_NAME BY EMP_ID
HEADING
"List Of Employees By Employee ID"
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=HEADING, STYLE=BOLD, $
TYPE=REPORT, GRID=OFF, $ 
TYPE=REPORT, 
IMAGE=E:\IBI\WEBFOCUS81\APPS\IBINCCEN\IMAGES\LEFTLOGO.GIF,
     FOCEXEC=IMAGE-D, $ 
ENDSTYLE
END

Note: The IBINCCEN directory contains the English version of the samples.

Drill-down report (IMAGE-D):

TABLE FILE EMPDATA
PRINT SALARY
BY DIV
WHERE DIV LE 'CORP';
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END

The output for the main report is:

When you click the graphic, the output is:

DIV
SALARY
CE
 $62,500.00
 $54,100.00
 $25,400.00
$115,000.00
 $33,300.00
 $25,000.00
 $49,000.00
 $40,900.00
 $43,000.00
 $45,000.00
CORP
 $55,500.00
 $83,000.00
 $32,000.00
 $62,500.00
 $79,000.00
 $35,200.00
 $62,500.00
 $26,400.00