How to: |
Reference: |
WebFOCUS Client variables give you control over the display of multiple reports on the same HTML page with multiple frames without coding HTML FRAME syntax. It also allows you to link multiple reports with a single Table of Contents (TOC) that calls them. For example, you can use these variables to display different report formats, such as HTML and PDF, on a single launch page.
Note:
You can:
Use the variables described in this topic with procedures that generate more than one report. See Managing Flow of Control in an Application for details on the use of -RUN, -INCLUDE, and EX to code multiple report requests.
Two formats of multiple reports are supported:
The following are the variables that control multiple reports.
IBIWF_mreports
Controls the multiple report option and creates either a TOC or a frameset with one report for each frame in the browser.
The syntax is
IBIWF_mreports = {OFF|INDEX|FRAME} IBIWF_mrcolumns = {1|n} IBIWF_mrrows = nIBIWF_mprefix = {Report|text} IBIWF_morder = {FORWARD|REVERSE} IBIWF_mframename = {MREPORT|text} IBIWF_index = {ON|OFF}
where:
Disables the multiple report option. OFF is the default value.
Creates a TOC that lists all reports in a procedure. Default sequence numbers are from 1 (for the first report generated) to n (for the last report generated). Used with IBIWF_mprefix.
Creates a default frameset. The number of reports in the frameset is determined by the IBIWF_mrcolumns variable.
IBIWF_mrcolumns
Is the number of side-by-side reports from left to right across the page when IBIWF_mreports is set to FRAME. If this variable is not set, reports are displayed top to bottom.
The syntax is
IBIWF_mrcolumns = {1|n}
where:
Is the number of reports. The default value is 1. The maximum value is 9.
IBIWF_mrrows
Is the number of vertically stacked reports when IBIWF_mreports is set to FRAME.
The syntax is
IBIWF_mrrows = n
where:
Is the number of reports desired from top to bottom.
IBIWF_mprefix
Is descriptive text that precedes a sequence number and identifies a report on a TOC.
WebFOCUS appends the number 1 (for the first report generated) to n (for the last report generated), as set by the index value on IBIWF_mreports.
Do not use this variable if IBIWF_mreports = FRAME.
The syntax is
IBIWF_mprefix = {Report|text}
where:
Is a character string, up to 50 characters long. The maximum length does not include the number appended by WebFOCUS. The default value is Report.
IBIWF_morder
Is the order in which reports display in the browser. Applies only when IBIWF_mreports = FRAME. Ignored when IBIWF_mreports = INDEX.
The syntax is
IBIWF_morder = {FORWARD|REVERSE}
where:
Displays reports in the order in which they were coded and executed. This value is the default.
Displays reports in the reverse order in which they were coded and executed. This is especially useful if the last report is a summary report you would like to display on the webpage first.
IBIWF_mframename
Is a name for a frame when IBIWF_mreports = FRAME. If you do not code this variable, WebFOCUS internally names the frames MREPORT1 through MREPORTn, which may conflict with other HTML code.
The syntax is
IBIWF_mframename = {MREPORT|text}
where:
Is a character string, up to 20 characters long.
IBIWF_index
Controls whether a sequence number (1, 2,...n) is appended to the end of the names on the TOC when IBIWF_mreports = INDEX.
The syntax is
IBIWF_index = {ON|OFF}
where:
Appends a sequence number of 1 (for the first report generated) to n (for the last reported generated). ON is the default value.
Omits a sequence number. Only the text specified by IBIWF_mprefix applies.
<A HREF="/alias/WFServlet?IBIF_ex=report1[&var=value[&var=value]...]"> text</A> <A HREF="/alias/WFServlet?IBIF_ex=report2[&var=value[&var=value]...]"> text</A>
where:
Points to the directory in which the WebFOCUS Client is located. An application or web server uses an alias to provide a logical name for a physical directory. The WebFOCUS default alias is ibi_apps. It is customizable during the WebFOCUS Client installation from which it is then configured..
To call WebFOCUS on another web server, specify a fully qualified URL that includes the server name and port of the application or web server, For example
<A HREF="http://servername:port/alias/WFServlet?IBIF_ex=report1[&var=value[&var=value]...]"> text</A> <A HREF="http://servername:port/alias/WFServlet?IBIF_ex=report2[&var=value[&var=value]...]"> text</A>
Is the name of the application or web server on which WebFOCUS is installed.
Is the port on which the server is listening
Is the name of the procedure to run.
Is a WebFOCUS Client variable and its corresponding value.
You can pass more than one variable-value pair, but do not include a space between pairs. Use an ampersand (&) as a delimiter to separate each variable-value pair. A value can be a maximum of 80 characters long.
If a value contains an embedded blank, substitute a plus sign (+) or the characters %20 for the blank.
For a list of variables and valid values, see WebFOCUS Client Variables.
Is the text on the launch page that serves as the hyperlink that runs the procedure.
The following is an example of displaying two reports with an index value.
Procedure:
TABLE FILE GGSALES SUM DOLLARS BY PRODUCT ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END -RUN
TABLE FILE GGSALES SUM UNITS DOLLARS BY PRODUCT ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END -RUN
Launch Page:
<HTML> <BODY> <A HREF="/ibi_apps/WFServlet?IBIF_ex=tworpts &IBIWF_mreports=index&IBIWF_mprefix=Sales+Analysis+Report"> Run report.</A> </BODY> </HTML>
Click Sales Analysis Report 2 for the report on total unit and dollar sales:
-TYPE WEBFOCUS CGIVAR var=value . . . -RUN
where:
Is a WebFOCUS Client variable and its corresponding value. You can include only one variable-value pair per each -TYPE command.
For a list of variables and valid values, see WebFOCUS Client Variables.
Note: Include the command -RUN at the end of each request to execute the previous set of -TYPE commands.
The following is an example of displaying side-by-side reports.
-TYPE commands create a two-frame page on which the reports display side-by-side.
Procedure:
-TYPE WEBFOCUS CGIVAR IBIWF_mreports=FRAME -TYPE WEBFOCUS CGIVAR IBIWF_mrcolumns=2 TABLE FILE CENTORD HEADING "Sales By Store" SUM LINEPRICE AS 'Sales' BY SNAME ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END -RUN TABLE FILE CENTORD HEADING "Sales By Product" " " SUM LINEPRICE AS 'Sales' BY PRODCAT AS 'Product' ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END
The following is an example of displaying two reports with descriptive names and sequence numbers.
-TYPE commands set the variables that provide an identifier (HTML Report and PDF Report) and sequence number (1 and 2) to each report. The command that creates the TOC is required only once at the beginning of the procedure.
Procedure:
-TYPE WEBFOCUS CGIVAR IBIWF_mreports=INDEX -TYPE WEBFOCUS CGIVAR IBIWF_mprefix=HTML Report TABLE FILE GGSALES SUM DOLLARS BY PRODUCT ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END -RUN
TABLE FILE GGSALES -TYPE WEBFOCUS CGIVAR IBIWF_mprefix=PDF Report SUM DOLLARS BY PRODUCT ON TABLE PCHOLD FORMAT PDF END
The following is an example of displaying two reports with descriptive names only.
Procedure:
-TYPE WEBFOCUS CGIVAR IBIWF_mreports=INDEX -TYPE WEBFOCUS CGIVAR IBIWF_index=OFF -TYPE WEBFOCUS CGIVAR IBIWF_mprefix=HTML Report TABLE FILE GGSALES SUM DOLLARS BY PRODUCT ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END -RUN
-TYPE WEBFOCUS CGIVAR IBIWF_mprefix=PDF Report TABLE FILE GGSALES SUM DOLLARS BY PRODUCT ON TABLE PCHOLD FORMAT PDF END
The following is an example of displaying two reports with sequence numbers only.
-TYPE WEBFOCUS CGIVAR IBIWF_mreports=INDEX -TYPE WEBFOCUS CGIVAR IBIWF_mprefix= TABLE FILE GGSALES SUM DOLLARS BY PRODUCT ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END -RUN
TABLE FILE GGSALES SUM DOLLARS BY PRODUCT ON TABLE PCHOLD FORMAT PDF END