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:
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.
TYPE=DATA,[COLUMN|ACROSSCOLUMN=Nn,]COLOR=color,[WHEN=expression,] FOCEXEC=fex[(parameters ...),]$
where:
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.
Is the graph subcomponent to which you want to apply color. Valid graph subcomponents are COLUMN and ACROSSCOLUMN.
Identifies the color that you want to apply to the graph component or subcomponent. For a list of valid colors, see Formatting Report Data.
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.
Identifies the file name of the linked procedure to run when a user selects the report object.
Are values to be passed to the procedure. You can pass one or more values, using any combination of the following methods:
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.
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.
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:
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:
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.
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.
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:
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.
Values that are passed to the URL. For details, see Creating Parameters.
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.
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.
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:
TYPE=type, [subtype], JAVASCRIPT=function[(parameters ...)], $
where:
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.
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.
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:
For more information about the -HTMLFORM command, see the TIBCO WebFOCUS® Developing Reporting Applications manual.
Values that are passed to the JavaScript function. For details, see Creating Parameters.
TYPE=type, [subtype], DRILLMENUITEM='description'|'DrillDown n', type_of_link
where:
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.
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.
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.
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.
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.
You can link to:
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.
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.