Outline:
- BIP Template – Formatting Introduction
- Two Methods for Selecting Formatting Options
- Formatting Demonstrations
- Using Form Fields in Page Headers and Footers
- Calculations
- Conditional Formatting
- Formatting Fields in a Table
- Formatting Dates
- Repeating Data – Insert a Repeating Group
- Repeating Data by Field
- Using Tables for Repeating Data
- Invoice Listing by Supplier 1
- Oracle BI Publisher Demo Library – recordings
BIP Template – Formatting Introduction
These are illustrations of some techniques for formatting the layout in BI Publisher Word Template. Below are ways to edit the structure and appearance of data in your template, to group data, enhance the output with conditional displays, calculations, aggregations, and a number of other processes. Some tasks, such as grouping, can be done in more than one way, for example, by using the Table Wizard and Table/Form dialog menus, as well as the Create Group and Repeating Group options mentioned below. A few of the examples were created in conjunction with Comm Gen, but the same basic principles apply.
Two Methods for Selecting Formatting Options:
- BI Publisher Properties: To open the BI Publisher menu/dialog box, right-click or double-click on the field you wish to work with. When the menu opens, hover over BI Publisher, then slide the cursor to the right and select Properties, Create Group, or Create Conditional Region.
- Insert Menu: Select these items under the Insert Menu – Repeating Group, Conditional Format, or Conditional Region.
Formatting Demonstrations
- Using Form Fields in Page Headers and Footers
- You will find that if you try to insert a form field to be part of each page header and/or footer, you will receive this error message: “You cannot paste form fields into comments, headers, footers, footnotes, end notes, or text boxes.”
- That is, as they first appear, the BI Publisher fields cannot be put into the RTF Word Document Page Header.
- Here is one method to get around that restriction by hard-coding the field into the document:
- The form field in this example is TERM_DESCRIPTION
- In order to have the output appear in the header on each page, surround the field name so that it appears as follows:
- <?TERM_DESCRIPTION?>
-
Calculations
-
Conditional Formatting
-
Formatting Fields in a Table
-
Formatting Dates
-
Repeating Data – Insert a Repeating Group
- The following samples were developed by modifying Oracle supplied Word Template examples. The components have been combined into individual documents to demonstrate a facet of designing a template.
- To insert a Repeating Group, start by clicking on a field that has been inserted into the template and then selecting Add-Ins > Insert > Repeating Group.
- Each document in this section:
- Lists the fields, contents and description
- Displays the appearance of the fields on the template
- Shows screenshots of the formatting properties
- Displays the final output
-
- Repeating Data by Field: Supplier (VENDOR) names and addresses in a list running down the page
- Uses a ‘for-each’ command (<?for-each:G_VENDOR_NAME?>) in the Grp:Supplier field to loop through them and a corresponding End Supplier field to close the loop.
- Click on Insert > Field.
- After typing “Supplier:” and “Address:” insert the VENDOR_NAME and ADDRESS fields to the right of their respective labels.
- Highlight the row and click on Insert > Repeating Group.
- Preview the PDF.
- Uses a ‘for-each’ command (<?for-each:G_VENDOR_NAME?>) in the Grp:Supplier field to loop through them and a corresponding End Supplier field to close the loop.
- Using Tables for Repeating Data: Supplier (VENDOR) names and addresses in three table variations:
- Table 1 – Simple – Similar to the previous example, this lists the suppliers and their addresses, this time in a table. The Grp:Supplier (<?for-each:G_VENDOR_NAME?>) and End Supplier fields are placed above and below the table. The table will be repeated for each Supplier/Address pair.
- Table 2 – Single Header – Rather than repeat the labels for each row of data we can place it at the top of the table and then list the supplier and address. This time the Grp:Supplier (<?for-each:G_VENDOR_NAME?>) and End Supplier fields are placed into the starting and finishing cell of the second row of the table. The labels will now only appear on top of the table and the data will be listed below.
- Table 3 – Row Striping – If you would like a striped effect on your rows this can be achieved in the template. We now use two almost identical data rows in the table. The native XSL position() function is used to assign each row a numeric value, an ‘if’ statement is then used to test the value (<?for-each:G_VENDOR_NAME?><?if:number(position()mod2)=0?>).
- Invoice Listing by Supplier 1: Single Header
- Uses ‘for-each’ command (<?for-each:G_INVOICE_NUM?>) in the Grp:Invoice field. Includes information on MS Word Repeatable Row Headers and Splitting Rows across pages.
- Repeating Data by Field: Supplier (VENDOR) names and addresses in a list running down the page
Oracle BI Publisher Demo Library
- This document contains links to brief Oracle recordings displaying the steps to perform the following formatting processes in BI Publisher Template:
- Conditional Formatting
- Formatting Dates
- Formatting Numbers
- Page Level Calculations
- Page Breaks
- Page Numbers
- Shapes