Linking Graphs to Other Resources

In this section:

How to:

Reference:

To drill down to a more detailed level of information in a graph, you can link a procedure (FOCEXEC) or a URL to one or more values in your graph. When you run your graph, the selected values become "hot spots" that invoke the underlying procedure, JavaScript function, or URL.

The JSURLS parameter includes JavaScript or VBScript files in an HTML graph. This allows you to customize the display of WebFOCUS HTML graphs with any JavaScript or VBScript functions. The JavaScript and VBScript files are the last files loaded, and are loaded in the order they are listed, allowing complete customization of the HTML page.

This feature works with any graph format that outputs an HTML document, for example JSCHART and PCHOLD FORMAT PNG.

In addition, when a WebFOCUS graph is run, a set of pre-defined JavaScript functions is invoked. Using JSURLS, you can disable or modify these default functions. To view the full set of pre-defined JavaScript functions, see /ibi/WebFOCUSxx/ibi_apps/ibi_html/javaassist/ibi/html/js/ibigl.js.

The syntax is:

SET JSURLS='/file1 [/file2] [/file3]...'

where:

/file1 [/file2] [/file3]...

Are the files that contain JavaScript or VBScript. If there is more than one js file, the delimiter is a blank and the values must be enclosed in single quotes. Files must be in a location that is accessible by the web server. The total length of the value is limited to 256 bytes.

You can reference files with a URL.

Syntax: How to Link a Graph to Another Request

TYPE=DATA,[COLUMN|ACROSSCOLUMN=Nn,]COLOR=color,[WHEN=expression,]
FOCEXEC=fex[(parameters ...),]$

where:

DATA

Identifies Data as the graph component to which the user is applying the color. The TYPE attribute and its value must appear at the beginning of the declaration.

COLUMN|ACROSSCOLUMN

Is the graph subcomponent to which you want to apply color. Valid graph subcomponents are COLUMN and ACROSSCOLUMN.

color

Identifies the color that you want to apply to the graph component or subcomponent. For a list of valid colors, see Formatting Report Data.

Nn

Identifies a column by its position in the report. To determine this value, count BY fields, display fields, and ROW-TOTAL fields, from left to right, including NOPRINT fields. For more information, see Identifying a Report Component in a WebFOCUS StyleSheet.

FOCEXEC=fex

Identifies the file name of the linked procedure to run when a user selects the report object.

parameters

Are values to be passed to the procedure. You can pass one or more values, using any combination of the following methods:

  • You can specify a constant value, enclosed in single quotation marks.
  • You can specify the name or the position of a graph column.
  • You can specify the name of a Dialogue Manager amper variable to pass its value.
  • You can use amper variables only in inline StyleSheets.

Note: The usual use of an amper variable is to pass a constant value, in which case, it would have to be embedded in single quotation marks. For example:

'&ABC'.

The method you can use to pass values can vary, depending on the method you use to execute the hyperlink. You can pass one or more values. The entire string of values must be enclosed in parentheses, and separated from each other by a blank space.

expression

Is any Boolean expression that specifies conditions for applying the specified color to the graph component. The expression must be valid on the right side of a COMPUTE command. For details, see Using Expressions.

Note: IF ... THEN ... ELSE logic is not necessary in a WHEN clause and is not supported.

All non-numeric literals in a WHEN expression must be specified within single quotation marks.

Example: Linking to Additional Reports or Graphs

In this example, when the value for UNITS is less than four hundred thousand, the color is lime and you can drill-down to a detail report.

GRAPH FILE GGSALES
SUM UNITS DOLLARS ACROSS PRODUCT
ON GRAPH SET STYLE *
TYPE=DATA,COLOR=SILVER,$
TYPE=DATA,ACROSSCOLUMN=N1,COLOR=LIME,WHEN=N1 LT 400000,FOCEXEC=GRAPH2,$
ENDSTYLE
END

The output is:

Syntax: How to Link to a URL

You can define a link from any 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 component to access the URL.

The links you create can be dynamic. With a dynamic link, your selection passes the value of the selected 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:

type

Identifies the report or graph 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 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.

Syntax: How to Link to a JavaScript Function

You can use a StyleSheet to define a link to a JavaScript function from any report or graph component. After you have defined the link, you can select the component to execute the JavaScript function.

Just as with drill-down links to procedures and URLs, you can specify optional parameters that allow values of a component to be passed to the JavaScript function. The function will use the passed value to dynamically determine the results that are returned to the browser. For details, see Creating Parameters.

Note:

  • JavaScript functions can, in turn, call other JavaScript functions.
  • 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.
TYPE=type, [subtype], JAVASCRIPT=function[(parameters ...)], $

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 details.

function

Identifies the JavaScript function to run when you select the report component.

The maximum length of a JAVASCRIPT=function argument, including any associated parameters, is 2400 characters and can span more than one line. If you split a single argument across a line, you need to use the \ character at the end of the first line, as continuation syntax. If you split an argument at a point where a space is required as a delimiter, the space must be before the \ character or be the first character on the next line. The \ character does not act as the delimiter.

In this example,

JAVASCRIPT=myfunc(COUNTRY \
CAR MODEL 'ABC'),$

the argument correctly spans two lines.

Note:

  • You can use the SET JSURLS command or the Dialogue Manager -HTMLFORM command to embed the chart into an HTML document in which the function is defined.
  • When you have an HTML document called by -HTMLFORM, ensure that the file extension is .HTM (not .HTML).

For more information about the -HTMLFORM command, see the TIBCO WebFOCUS® Developing Reporting Applications manual.

parameters

Values that are passed to the JavaScript function. For details, see Creating Parameters.

Syntax: How to Create Multiple Drill-Down Links

TYPE=type, [subtype], DRILLMENUITEM='description'|'DrillDown n',
     type_of_link

where:

type

Identifies the 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 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 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.

Reference: Syntax Guidelines

You can create multiple drill-down links from a component on a summary request, chosen from any combination of supported actions. For example, you can create links to a detail report, chart, or Maintain procedure, a JavaScript function, and a URL. When you click a component in the summary request, a pop-up menu appears listing the drill-down options.

This feature does not apply to headings or footings,

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 Stylesheet 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.

Tip: You can make changes to the /ibi/WebFOCUS82/ibi_apps/ibi_html/javaassist/ibi/html/js/multidrill.css file to affect the font, size, and color of the DRILLMENUITEM menu.

  • Make a backup of the /ibi/WebFOCUS82/ibi_apps/ibi_html/javaassist/ibi/html/js/multidrill.css file.
  • Modify the multidrill.css file, with the desired changes.
  • Rename the multidrill.css.gz file. This file resides in the same location as the multidrill.css file.
  • Clear cache.
  • Restart the Reporting Server.

Reference: Summary of Drill-Down Links

You can link to:

  • Another request. The StyleSheet attribute is FOCEXEC.
  • A URL. The StyleSheet attribute is URL. You pass a valid URL.

    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 the support site for your browser vendor.

  • A URL from a field. The StyleSheet attribute is URL. You pass the name of a report column whose value is a valid URL to which the link will jump.
  • A JavaScript function. The StyleSheet attribute is JAVASCRIPT.
  • A WebFOCUS Maintain procedure. The StyleSheet attribute is URL with the keyword MNTCON EX. For details on the syntax, see Linking to a WebFOCUS Maintain Procedure.
  • A WebFOCUS compiled Maintain procedure. The StyleSheet attribute is URL with the keyword MNTCON RUN. For details on the syntax, see Linking to a WebFOCUS Maintain Procedure.

Creating Parameters

Parameters allow you to specify criteria and conditions for the linked (drill down) report. By defining parameters, you can control the amount and type of information to retrieve when you click on a hot spot.

For complete details, see Linking a Report to Other Resources.