In this section: |
Normally, a web server returns an entire report to a browser. The browser waits until it receives all of the report before displaying it.
On-demand paging allows you to download one page of a report that is up to 99999 pages long to a browser instead of downloading the entire report at once. The web server holds the remaining pages until the user requests them. This feature shortens the time the user waits to see the first page of a report. It is especially effective for long reports.
On-demand paging is implemented in the WebFOCUS Viewer. It requires that report output be formatted as HTML, which is the default setting for a request submitted through the WebFOCUS Client.
The following is a report displayed in the WebFOCUS Viewer.
How to: |
When you run a report designated for On-Demand Paging, the WebFOCUS Viewer opens automatically and displays the first page of the report. The Viewer consists of two panes: the Report Pane and the Viewer Control Panel, as shown in the following image.
The Report Pane is the larger pane and contains one page of report output. When you first run a report, the Report Pane contains the first page of report output. The Viewer Control Panel contains the controls that allow you to display specific pages, deliver the entire report to your web server, and search your document for particular strings of information.
SET WEBVIEWER = {OFF|ON}
or
ON TABLE SET WEBVIEWER {OFF|ON}
where:
Disables on-demand paging. WebFOCUS downloads the entire report to a standard browser window. OFF is the default value.
Enables on-demand paging. WebFOCUS downloads the first page of a report to the browser in the Viewer. The number of lines displayed at one time depends on Windows desktop settings (resolution).
The procedure and launch page for this example are run in WebFOCUS. They must be tested and run in this environment.
Procedure:
SET WEBVIEWER=ON TABLE FILE CENTORD PRINT ORDER_NUM ORDER_DATE BY STORE_CODE WHERE STORE_CODE EQ '1003DC' ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF,$ ENDSTYLE END
How to: |
Reference: |
You can specify a target frame in which to open the WebFOCUS Viewer, and a home page that displays when you close the Viewer.
SET WEBVIEWTARG = {target_frame|OFF}
where:
Is the name of an existing frame in the browser or one of the following reserved HTML target frames:
Opens the Viewer in a new browser window. This is the default for reports that do not have accessibility enabled.
Opens the Viewer in the same frame as the anchor.
Opens the Viewer in the immediate parent frame that contains the anchor.
Opens the Viewer in the current browser window.
Opens the Viewer in the frame from which you ran the report. This is the default for reports that have accessibility enabled.
Note: For more information on enabling accessibility, see ACCESSIBLE.
SET WEBVIEWHOME = {home_URL|OFF}
where:
Is a valid URL that displays an HTML page when you close the Viewer.
Displays a blank browser window when you close the Viewer. You must enter another URL to run another report. OFF is the default value.
The Close button, located on the Control Frame, closes the Viewer and removes the report from the web server. The page the browser displays next depends on the WEBVIEWTARG and the WEBVIEWHOME settings, as follows:
How to: |
You can issue commands that specify whether the Viewer displays the Close, Help, and All Pages buttons.
SET WEBVIEWCLOSE = {OFF|ON}
or
ON TABLE SET WEBVIEWCLOSE {OFF|ON}
where:
Displays the Close button. ON is the default value.
Does not display the Close button.
SET WEBVIEWHELP = {OFF|ON}
or
ON TABLE SET WEBVIEWHELP {OFF|ON}
where:
Displays the Help button. ON is the default value.
Does not display the Help button.
SET WEBVIEWALLPG = {OFF|ON}
or
ON TABLE SET WEBVIEWALLPG {OFF|ON}
where:
Displays the All Pages button. ON is the default value.
Does not display the All Pages button.
The Settings dialog box opens.
In this section: |
How to: |
The Viewer Control Panel, as shown in the following image, (located at the bottom of the window) contains the controls you use to navigate through the report and to search for a string in the report. The Viewer Control Panel navigational controls allow you to display the next or previous page, the first or last page, or a specific page. You use the searching function to have the Viewer locate a search string you specify within all report pages.
Note: When specifying a search string, you must specify the actual number of spaces between characters because HTML displays a single space, even when multiple spaces are used between characters.
The Viewer Control Panel offers several ways to view pages in your report:
How to: |
The Viewer Control Panel contains controls that offer several ways to search your report. Using the Viewer search controls, you can select a string of information, such as a phrase that occurs in your report or a group of numbers, and search for each occurrence of that string. You can further customize your search by matching capitalization of words exactly (a case-sensitive search) or by controlling the direction of your search (either forward or backward from your starting point in the report). Use these controls to search your report:
Notice that the Viewer displays the Match Case button with a red line across it to indicate that it is active.
Or
The Viewer searches the report, underlines the first occurrence of the string, and opens the display to the top of the page on which it appears. If the underlined occurrence of the string is not visible, scroll down the page until it appears in the window of the Viewer.
You want to use the Viewer Control Panel to navigate a long report called Coffee Sales to find occurrences of the string "Kona," a type of coffee that you sell. After you run the report, WebFOCUS displays the first page of the report in the Viewer.
The Viewer returns your report with the first occurrence of your search string underlined, as shown in the following image.
The WebFOCUS Viewer searches the report and underlines the first occurrence of the text string found. You may customize the search results by applying a Cascading Style Sheet (CSS) with a color and/or style defined.
BODY { font : x-small Verdana, Arial, Helvetica; } U { background : Blue; text-decoration : none; color : White; font : bold; }
In the CSS example code above, underlined text in the body of the report will be changed to set the background color to Blue, set the text to bold, and set the text color to White.
Note: Type .css as the file extension. For example, findcolor.css.
The location in which to save the CSS file depends on the WebFOCUS environment you are working in.
Note: CSS files are accessed from a web accessible location. For WebFOCUS installations, the /ibi_apps/ibi_html alias is a location in which web accessible content can be stored.
In the following code, the findcolor.css Cascading Style Sheet file is applied to the report:
TABLE FILE CAR PRINT CAR MODEL SEATS BY COUNTRY ON TABLE SET WEBVIEWER ON ON TABLE SET STYLE * CSSURL=/ibi_apps/ibi_html/findcolor.css, $ ENDSTYLE END
Note: Fully qualify the URL to the CSS file when the CSS file is located on a different web location than the WebFOCUS environment you are running the report from. For example: CSSURL=http://hostname[:port]/ibi_apps/ibi_html/findcolor.css $, where hostname[:port] is the host name and port number of the web or application server the CSS file is accessible from.
The WebFOCUS Viewer searches the report and highlights the first occurrence of the string found in blue. In the example below, a report using the findcolor.css Cascading Style Sheet file searches for and finds DOOR by highlighting the word in blue.
How to: |
You must clear the browser cache before printing a report locally using the Print button on the browser toolbar. You must also activate the window by clicking it before using the Print button.
Use the procedure that applies to your browser to clear the cache.