Skip Headers
Oracle® Fusion Middleware Oracle Reports User's Guide to Building Reports
11g Release 1 (11.1.1)

Part Number B32122-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

4.6 Work with Web Reports

This section provides procedures for the following tasks that you may perform as you work with Web reports:

See also

Section 1.2.2, "About Web Reports"

4.6.1 Creating a Web report

You can create a Web report in any of the following ways:

4.6.2 Viewing the source code for a Web report

To view the source code for a Web report, do any of the following:

  • In the Report Editor, click the Web Source button in the toolbar.

  • In the Object Navigator, double-click the view icon next to the Web Source node for the report to display the source code in the Web Source view.

  • Choose View > Change View > Web Source.

See also

Topic "Oracle Reports JSP tags" in the Reference section of the Oracle Reports online Help.

4.6.3 Adding report data to an existing Web page (HTML file)

To retrieve the data to be used to build a report to add to an existing Web page (HTML file):

  1. In the Object Navigator, choose File > Open.

  2. Navigate to your Web page (HTML file), and click Open.

  3. In the Object Navigator, find the report created when you opened the HTML file (Oracle Reports Builder may give the report a default name, such as REP1), then double-click the view icon next to the Data Model node to display the Data Model view.

    Caution:

    If you right-click the Data Model node, then choose Report Wizard to use the Report Wizard to select the data for a report, the report will overwrite all of the data in your existing Web page.

  4. In the Data Model view, choose Insert > Query to select data for the report using the Data Wizard.

    After you click Finish, the data you have selected is available to your Web report.

Next step

See Section 4.6.4, "Adding a report block to a Web page"

4.6.4 Adding a report block to a Web page

To add a report block to an existing Web page:

  1. In the Object Navigator, choose File > Open.

  2. Navigate to your Web page (HTML file), and click Open.

  3. In the Object Navigator, find the report created when you opened the HTML file (Oracle Reports Builder may give the report a default name, such as REP1).

  4. After you have added the data to be used to build the report (see Section 4.6.4, "Adding a report block to a Web page"), double-click the view icon next to the Web Source node to display the source code for the Web page in the Web Source view.

  5. Locate the section in the source code where you want to add the report block.

    Note:

    Adding some comment text such as "Place the report block here" to your Web page enables you to easily locate the correct position for your report block.

  6. Choose Insert > Report Block.

  7. In the Report Block Wizard, specify the information for the report block.

4.6.5 Adding an image

See Section 4.9.8.1, "Adding an image"

4.6.6 Adding a graph

See Section 4.9.8.2, "Adding a graph"

4.6.7 Editing a graph

See Section 4.9.8.3, "Editing a graph"

4.6.8 Adding a graph hyperlink

See Section 4.9.8.4, "Adding a graph hyperlink"

4.6.9 Preparing a paper-based report for the Web

To prepare a paper-based report for the Web:

  1. (Optional) Add desired Web links to a new or existing report:

  2. Select a printer or use the default printer setup (the drivers for the currently selected printer are used to produce the output; you must have a printer configured for the machine on which you are running the report).

  3. Display your report output in your Web browser (see Section 4.7.16.4, "Displaying report output in your Web browser")

See also

Section 1.2.2, "About Web Reports"

Section 2.2.3, "About Web links for HTML output"

Section 2.2.4, "About Web links for PDF output"

4.6.10 Adding Web links to paper-based reports

This section provides procedures that apply to paper-based reports generated to an HTML or PDF file. This is unrelated to HTML that might be generated when you run a JSP-based Web report (when you click the Run Web Layout button in the toolbar, or choose Program > Run Web Layout).

You can add Web links to paper-based reports by either:

4.6.10.1 Using the user interface

This section provides procedures for the following tasks that you may perform using the Oracle Reports Builder user interface to add Web links to paper-based reports:

See also

Section 1.2.2, "About Web Reports"

Section 2.2.3, "About Web links for HTML output"

Section 2.2.4, "About Web links for PDF output"

Section 2.2.10, "About before and after escapes"

4.6.10.1.1 Creating an HTML document header using the Property Inspector

Note:

This procedure is for HTML output only.

To insert an HTML file or text on the header page of your HTML document:

  1. In the Object Navigator, double-click the properties icon for the report to display the Property Inspector.

  2. Under the Report Escapes node, set the Before Report Type property to Text (if you will type the header) or File (if you will import the header from a file).

  3. Set the Before Report Value property by clicking the... button to either type HTML code in the dialog box or select an HTML file to import.

See also

Section 4.6.10.2.1, "Creating an HTML document header using PL/SQL"

4.6.10.1.2 Creating an HTML document footer using the Property Inspector

Note:

This procedure is for HTML output only.

To insert an HTML file or text on the footer page of your HTML document:

  1. In the Object Navigator, double-click the properties icon for the report to display the Property Inspector.

  2. Under the Report Escapes node, set the After Report Type property to Text (if you will type the footer) or File (if you will import the footer from a file).

  3. Set the After Report Value property by clicking the... button to either type HTML code in the dialog box or select an HTML file to import.

See also

Section 4.6.10.2.2, "Creating an HTML document footer using PL/SQL"

4.6.10.1.3 Creating an HTML page header using the Property Inspector

Note:

This procedure is for HTML output only.

To add a page header to every page of your HTML document:

  1. In the Object Navigator, double-click the properties icon for the report to display the Property Inspector.

  2. Under the Report Escapes node, set the Before Page Type property to Text (if you will type the header) or File (if you will import the header from a file).

  3. Set the Before Page Value property by clicking the... button to either type HTML code in the dialog box or select an HTML file to import.

To add a page header to a single page of your HTML document:

4.6.10.1.4 Creating an HTML page footer using the Property Inspector

Note:

This procedure is for HTML output only.

To add a page footer to every page of your HTML document:

  1. In the Object Navigator, double-click the properties icon for the report to display the Property Inspector.

  2. Under the Report Escapes node, set the After Page Type property to Text (if you will type the footer) or File (if you will import the footer from a file).

  3. Set the After Page Value property by clicking the... button to either type HTML code in the dialog box or select an HTML file to import.

To add a page footer to a single page of your HTML document:

4.6.10.1.5 Creating an HTML Parameter Form header using the Property Inspector

Note:

This procedure is for HTML output only.

To add items to the top of the HTML Parameter Form:

  1. In the Object Navigator, double-click the properties icon next to the report name to display the Property Inspector.

  2. Under the Report Escapes node, set the Before Form Type property to Text (if you will type the header) or File (if you will import the header from a file).

  3. Set the Before Form Value property by clicking the... button to either type HTML code in the dialog box or select an HTML file to import.

See also

Section 2.5.1, "About Parameter Form HTML extensions"

Section 4.6.10.2.5, "Creating an HTML Parameter Form header using PL/SQL"

4.6.10.1.6 Creating an HTML Parameter Form footer using the Property Inspector

Note:

This procedure is for HTML output only.

To add items to the bottom of the HTML Parameter Form:

  1. In the Object Navigator, double-click the properties icon next to the report name to display the Property Inspector.

  2. Under the Report Escapes node, set the After Form Type property to Text (if you will type the footer) or File (if you will import the footer from a file).

  3. Set the After Form Value property by clicking the ... button to either type HTML code in the dialog box or select an HTML file to import.

See also

Section 2.5.1, "About Parameter Form HTML extensions"

Section 4.6.10.2.6, "Creating an HTML Parameter Form footer using PL/SQL"

4.6.10.1.7 Creating a hyperlink destination using the Property Inspector

To add a hyperlink destination to your report:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object that will be the destination of a Web link.

    Note:

    If you are defining a template, you can select objects in the margin. Objects in the body are unknown until the template is applied to a report.

  2. Double-click the object that will be the destination of a Web link to display the Property Inspector.

  3. Under the Web Settings node, set the Hyperlink Destination property to an identifier for the object.

See also

Section 2.2.7, "About hyperlink destinations"

Section 4.6.10.2.8, "Creating a hyperlink destination using PL/SQL"

4.6.10.1.8 Creating a hyperlink using the Property Inspector

To add a hyperlink to your report:

  1. Create a hyperlink destination, as described in the steps above, which will be the target of the Web link.

  2. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object that will be the source of the Web link.

    Note:

    If you are defining a template, you can select objects in the margin. Objects in the body are unknown until the template is applied to a report.

  3. Double-click the object that will be the source of the Web link to display the Property Inspector.

  4. Under the Web Settings node, set the Hyperlink property to the destination of the link.

    For examples, see the description of the Hyperlink property in the Reference section of the Oracle Reports online Help.

    Note:

    A report output in PDF format can include both hyperlinks and application command line links. If the Application Command Line property is set for an object, it will be applied to the object. Otherwise, the Hyperlink property is applied.

  5. To apply additional HTML attributes to the hyperlink, set the Additional Hyperlink Attributes property accordingly.

See also

Section 2.2.5, "About hyperlinks"

Section 4.6.10.2.7, "Creating a hyperlink using PL/SQL"

4.6.10.1.9 Creating an application command line link using the Property Inspector

Note:

This procedure is for PDF output only.

To associate a command with an object in your report:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object with which you want to associate a command.

    Note:

    If you are defining a template, you can select objects in the Margin. Objects in the body are unknown until the template is applied to a report.

  2. Double-click the object with which you want to associate a command to display the Property Inspector.

  3. Under the Web Settings node, set the Application Command Line property to the command you want to execute when the object is clicked.

    Note:

    A report output in PDF format can include both hyperlinks and application command line links. If the Application Command Line property is set for an object, it will be applied to the object. Otherwise, the Hyperlink property is applied.

Restrictions

An object that is associated with an application command line link cannot also be the source of a Web link (a hyperlink).

See also

Section 2.2.9, "About application command line links"

Section 4.6.10.2.9, "Creating an application command line link using PL/SQL"

4.6.10.1.10 Creating a bookmark using the Property Inspector

To create a bookmark on objects other than break columns in the bookmark area of your HTML or PDF document:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object with which you want to associate a bookmark (typically, the object is a repeating frame or frame that encloses the relevant section of the report).

    Note:

    If you are defining a template, you can select objects in the Margin. Objects in the body are unknown until the template is applied to a report.

  2. Double-click the object with which you want to associate a bookmark to display the Property Inspector, and set the following properties:

    • Under the Web Settings node, set the Bookmark property to the string you want to appear in the bookmark area of the formatted report.

See also

Section 2.2.8, "About bookmarks"

Section 4.6.10.2.10, "Creating a bookmark using PL/SQL"

4.6.10.1.11 Creating a bookmark on break columns using the Property Inspector

To create a bookmark on break columns in the bookmark area of your paginated HTMLCSS or paper PDF document:

  1. In the Paper Layout view, choose Insert > Bookmark.

  2. In the Insert Bookmarks dialog box, move the desired column(s) to the Bookmarks list.

  3. Click OK.

See also

Section 2.2.8, "About bookmarks"

Section 4.6.10.2.10, "Creating a bookmark using PL/SQL"

4.6.10.1.12 Adding navigation controls for HTML page-streamed output using the Property Inspector

Note:

This procedure is for HTML output only.

To add navigation controls for HTML page-streamed (paginated) output:

  1. In the Object Navigator, double-click the properties icon next to the report name to display the Property Inspector.

  2. Set the Page Navigation Control Type and Page Navigation Control Value properties.

    Note:

    If you do not change the default Page Navigation Control Value, Oracle Reports Builder will use a default built-in JavaScript for implementing the navigation between the pages of output.

See also

Section 2.8.8.1, "About HTML page streaming"

Section 4.7.16.5, "Displaying individual pages of HTML report output"

Section 4.6.10.2.11, "Adding navigation controls for HTML page-streamed output using PL/SQL"

4.6.10.2 Using PL/SQL

This section provides procedures for the following tasks that you may perform as you work with PL/SQL to add Web links to paper-based reports:

See also

Section 1.2.2, "About Web Reports"

Section 2.2.3, "About Web links for HTML output"

Section 2.2.4, "About Web links for PDF output"

Section 2.2.10, "About before and after escapes"

4.6.10.2.1 Creating an HTML document header using PL/SQL

Note:

This procedure is for HTML output only. A before report escape should be set in a trigger that fires before the report starts formatting, such as the Before Report trigger.

To add items to the header page of your HTML document using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Report Triggers node.

  2. Double-click the PL/SQL icon next to the Before Report trigger.

  3. In the PL/SQL Editor, include SRW.SET_BEFORE_REPORT_HTML to define the PL/SQL for the format trigger. (See the Reference section of the Oracle Reports online Help for more information).

See also

Section 4.6.10.1.1, "Creating an HTML document header using the Property Inspector"

4.6.10.2.2 Creating an HTML document footer using PL/SQL

Note:

This procedure is for HTML output only. An after report escape should be set in a trigger that fires before the report is done formatting, such as the Before Report trigger.

To add items to the footer page of your HTML document using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Report Triggers node.

  2. Double-click the PL/SQL icon next to the Before Report trigger.

  3. In the PL/SQL Editor, include SRW.SET_AFTER_REPORT_HTML to define the PL/SQL for the format trigger.

See also

Section 4.6.10.1.2, "Creating an HTML document footer using the Property Inspector"

4.6.10.2.3 Creating an HTML page header using PL/SQL

Note:

This procedure is for HTML output only. If you want the escape to apply to every page, set it in a trigger that fires before the report begins formatting, such as the Before Report trigger. If you want the escape to apply to a single page, set it in a Format trigger

To add a page header to every page of your HTML document using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Report Triggers node.

  2. Double-click the PL/SQL icon next to the Before Report trigger.

  3. In the PL/SQL Editor, include SRW.SET_BEFORE_PAGE_HTML to define the PL/SQL for the format trigger.

To add a page header to a single page of your HTML document using PL/SQL:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object that should fire the trigger when formatted.

  2. Double-click the PL/SQL icon next to the object that should fire the trigger when formatted.

  3. In the PL/SQL Editor, include SRW.SET_BEFORE_PAGE_HTML to define the PL/SQL for the format trigger.

See also

Section 4.6.10.1.3, "Creating an HTML page header using the Property Inspector"

4.6.10.2.4 Creating an HTML page footer using PL/SQL

Note:

This procedure is for HTML output only. If you want the escape to apply to every page, set it in a trigger that fires before the report begins formatting, such as the Before Report trigger. If you want the escape to apply to a single page, set it in a Format trigger.

To add a page footer to every page of your HTML document using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Report Triggers node.

  2. Double-click the PL/SQL icon next to the Before Report trigger.

  3. In the PL/SQL Editor, include SRW.SET_AFTER_PAGE_HTML to define the PL/SQL for the format trigger.

To add a page footer to a single page of your HTML document using PL/SQL:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object that should fire the trigger when formatted.

  2. Double-click the PL/SQL icon next to the object that should fire the trigger when formatted.

  3. In the PL/SQL Editor, include SRW.SET_AFTER_PAGE_HTML to define the PL/SQL for the format trigger.

See also

Section 4.6.10.1.4, "Creating an HTML page footer using the Property Inspector"

4.6.10.2.5 Creating an HTML Parameter Form header using PL/SQL

Note:

This procedure is for HTML output only. A before form escape should be set in a trigger that fires before the Parameter Form starts formatting, such as the Before Parameter Form trigger.

To add items to the top of the HTML Parameter Form using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Report Triggers node.

  2. Double-click the PL/SQL icon next to the Before Parameter Form trigger.

  3. In the PL/SQL Editor, include SRW.SET_BEFORE_FORM_HTML to define the PL/SQL for the format trigger.

See also

Section 2.5.1, "About Parameter Form HTML extensions"

Section 4.6.10.1.5, "Creating an HTML Parameter Form header using the Property Inspector"

4.6.10.2.6 Creating an HTML Parameter Form footer using PL/SQL

Note:

This procedure is for HTML output only. A before form escape should be set in a trigger that fires before the Parameter Form starts formatting, such as the Before Parameter Form trigger.

To add items to the bottom of the HTML Parameter Form using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Report Triggers node.

  2. Double-click the PL/SQL icon next to the Before Parameter Form trigger.

  3. In the PL/SQL Editor, include SRW.SET_AFTER_FORM_HTML to define the PL/SQL for the format trigger.

See also

Section 2.5.1, "About Parameter Form HTML extensions"

Section 4.6.10.1.6, "Creating an HTML Parameter Form footer using the Property Inspector"

4.6.10.2.7 Creating a hyperlink using PL/SQL

To add a hyperlink to your report using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object that will be the source of the Web link.

    Note:

    If you are defining a template, you can select objects in the Margin. Objects in the body are unknown until the template is applied to a report

  2. Double-click the PL/SQL icon next to the object that will be the source of the Web link.

  3. In the PL/SQL Editor, include SRW.SET_HYPERLINK to define the PL/SQL for the format trigger.

  4. To apply additional HTML attributes to the hyperlink, use
    SRW.SET_HYPERLINK_ATTRS
    .

Next step

Section 4.6.10.2.8, "Creating a hyperlink destination using PL/SQL"

See also

Section 2.2.5, "About hyperlinks"

Section 4.6.10.1.8, "Creating a hyperlink using the Property Inspector"

4.6.10.2.8 Creating a hyperlink destination using PL/SQL

To add a hyperlink destination to your report using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object that will be the destination of a Web link.

    Note:

    If you are defining a template, you can select objects in the Margin. Objects in the body are unknown until the template is applied to a report.

  2. Double-click the PL/SQL icon next to the object that will be the destination of a Web link.

  3. In the PL/SQL Editor, include SRW.SET_LINKTAG to define the PL/SQL for the format trigger.

Next step

Section 4.6.10.2.7, "Creating a hyperlink using PL/SQL"

See also

Section 2.2.7, "About hyperlink destinations"

Section 4.6.10.1.7, "Creating a hyperlink destination using the Property Inspector"

4.6.10.2.9 Creating an application command line link using PL/SQL

Note:

This procedure is for PDF output only.

To associate a command with an object in your report using PL/SQL instead of the Property Inspector:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object with which you want to associate an application command line link.

    Note:

    If you are defining a template, you can select objects in the Margin. Objects in the body are unknown until the template is applied to a report.

  2. Double-click the PL/SQL icon next to the object with which you want to associate an application command line link.

  3. In the PL/SQL Editor, include SRW.SET_PDF_ACTION to define the PL/SQL for the format trigger.

Restrictions

An object that is associated with an application command line link cannot also be the source of a Web link (a hyperlink).

See also

Section 2.2.9, "About application command line links"

Section 4.6.10.1.9, "Creating an application command line link using the Property Inspector"

4.6.10.2.10 Creating a bookmark using PL/SQL

To add a bookmark string in the bookmark area of your report using PL/SQL:

  1. In the Object Navigator, expand the Paper Layout node, then expand the node that contains the object with which you want to associate a bookmark (typically, the object is a repeating frame or frame that encloses the relevant section of the report).

    Note:

    If you are defining a template, you can select objects in the Margin. Objects in the body are unknown until the template is applied to a report.

  2. Double-click the PL/SQL icon next to the object with which you want to associate a bookmark.

  3. In the PL/SQL Editor, include SRW.SET_BOOKMARK to define the PL/SQL for the format trigger.

See also

Section 2.2.8, "About bookmarks"

Section 4.6.10.1.10, "Creating a bookmark using the Property Inspector"

Section 4.6.10.1.11, "Creating a bookmark on break columns using the Property Inspector"

4.6.10.2.11 Adding navigation controls for HTML page-streamed output using PL/SQL

Note:

This procedure is for HTML output only.

To add navigation controls for HTML page-streamed output using PL/SQL instead of the Property Inspector:

  • in a Before Report trigger, use the SRW.SET_PAGE_NAVIGATION_HTML PL/SQL procedure

See also

Section 2.8.8.1, "About HTML page streaming"

Section 4.7.16.5, "Displaying individual pages of HTML report output"

Section 4.6.10.1.12, "Adding navigation controls for HTML page-streamed output using the Property Inspector"