Professional Documents
Culture Documents
1 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Creating RTF Templates by Using BI Publisher 11g Template Builder for Word
This tutorial contains the following sections:
Purpose
Time to Complete
Overview
Prerequisites
Software Requirements
Installing Template Builder and Exploring the Template
Builder User Interface
Building an RTF Template in Offline Mode
Building an RTF Template in Online Mode
Working with a Pivot Table in an Existing RTF Template
Using Template Builder Utilities: Field Browser, Validate
Template, and Check Accessibility
Setting Configuration Options for Template Builder
Summary
Resources
Purpose
This tutorial covers how to use Oracle Business Intelligence Publisher Template Builder for MS Word to create RTF templates.
You will learn how to:
Log on to BI Publisher Server and create RTF templates in Online mode
Use the Sample XML/XML schema to create RTF templates in Offline mode
Create tabular reports
Create charts and pivot tables
Insert fields and repeating groups
Use native MS Word formatting
Use tools to validate templates, browse fields, and check accessibility
Time to Complete
Approximately 2 hours.
Overview
Template Builder is an extension to MS Word (2003 or later) that simplifies RTF template creation for Oracle BI Publisher reports.
Rich Text Format (RTF) is a specification used by common word processing applications, such as MS Word. Template Builder
provides easy-to-use wizards for inserting fields, tables, forms, charts, and cross-tabs. Also, Template Builder provides translation
features and enables you to preview reports by using the template in supported formats.
This tutorial provides step-by-step procedures to use Template Builder to create RTF templates for Oracle BI Publisher reports.
The examples will cover complex formatting and processing of reports by using these RTF templates. You will also learn how to
work in both Online and Offline modes. Translating the RTF templates is covered in detail in the other tutorial -: Exploring
Advanced Features of BI Publisher 11g, and also in the Instructor Led Training (ILT) for BI Publisher 11g.
Prerequisites
3/8/2016 7:07 PM
2 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Software Requirements
The following is a list of software requirements:
Microsoft Word (2003 or 2007)
Java SE Development Kit (JDK) 5 or later (This also includes Java Runtime Environment [JRE]. JRE 1.6 or later is required.)
MS .NET Framework 3.5 with SP1 or later.
Oracle BI EE 11g installed on a machine that Template Builder can connect to by using HTTP.
Oracle BI EE 11g should be able to connect to a supported data source.
Installing Template Builder and Exploring the Template Builder User Interface
In this topic, you will see how to download the Template Builder add-in, and install it. Then you will explore the the Template
Builder user interface.
Installing Template Builder
Exploring the Template Builder User Interface
3/8/2016 7:07 PM
3 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
2 . In the Get Started section of the Home page, click the Download BI Publisher Tools menu, and select Template
Builder for Word.
3/8/2016 7:07 PM
4 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3 . The Opening BIPublisherDesktop.exe dialog box opens. Click Save File. Save the file to a suitable location on
your hard drive.
4 . Navigate to the location where you have downloaded the BIPublisherDesktop.exe file and double-click the
executable file to begin the installation.
5 . a. After the Install Shield wizard starts, follow the on-screen instructions to complete the installation.
3/8/2016 7:07 PM
5 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
b. Click Finish.
6 . If Template Builder is installed correctly, you will see the BI Publisher ribbon in Word 2007:
.
Note: If you are using Microsoft Word 2007 you may need to modify your Add-In settings: To do so, click the Office
button, click Word Options, and then click Add-Ins.
3/8/2016 7:07 PM
6 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
(This file is made available to you in the My Templates and Files zip file, as well as in Sample after you install the
Template Builder.)
1 . The BI Publisher ribbon has the following options:
Online
You can log in to BI Publisher from here. After you log in, you can use the Open button to open a report from the
BI Publisher catalog.
Load Data
This group of commands enables you to load a saved sample data file or sample schema to Template Builder.
You must load data to use most of the Template Builder functionality. The Sample XML button allows you to
load a sample XML file that contains all the fields that you want to insert into your template as a data source. If
you are not connected to the BI Publisher server, use this method to load your data.
Insert
This group enables you to insert the following elements into your RTF template.
Table Wizard: This function provides a wizard that guides you through the creation of tables used in typical
reports.
Pivot Table: Using this you can drag and drop data elements into a pivot table.
Chart: BI Publisher does not recognize native Microsoft Word charts. The Insert Chart function allows you to
insert a chart that is understood by Oracle BI Publisher.
ab|Field: This function allows you to select fields from your data source and insert them into your template
Table/Form: Use this function to insert data fields to be organized as a simple or nested table or as a form
that is repeated with different data. You may even organize all the data fields for the whole document before
inserting them.
Repeating Group: Use this to select or define a group of elements to be repeated for each occurrence of
an element in the data.
Conditional Format: This enables you to define simple conditional formats to apply to table rows or cells.
Conditional Region: This enables you to insert a conditional statement around a region of the template. A
conditional region is an area that is surrounded by a conditional statement. If the statement tests true, the
area is displayed in the report; if the condition tests false, the area is suppressed from the report.
All Fields: This function inserts all fields found in the XML data into your document. It will also insert
processing instructions into your document that will repeat a section, such as a table row when the
associated XML element is repeated. When you are working on a deeply nested hierarchy of elements, it is
better to insert elements separately, instead of inserting all fields.
Preview
3/8/2016 7:07 PM
7 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
This enables you to preview your RTF template with sample XML data. The preview menu offers you PDF,
HTML, RTF, Power Point, Excel (MHTML format), and EXCEL2000 as output formats. When you select any
of these output formats, Template Builder will merge the data into your template and create the output
document.
Tools
This group has the following advanced editing tools for the templates:
Field Browser: This is for advanced users to review and edit BI Publisher commands inserted in the form
fields. It shows the commands behind each form field and allows you to edit them. Use this tool to correct
flawed RTF templates or to update multiple fields efficiently.
Validate Template: The validation function checks the template for incorrect use of BI Publisher commands
and unsupported elements in the Word file.
Check Accessibility : Run this tool to check for the accessibility features in the template.
Translation:
Extract Text: This command enables you to create a standard XLIFF translation file containing the
boilerplate text from your template. XLIFF is a standard file format that is understood by many translation
software packages. Because an XLIFF is an XML file, you can translate the text in a text editor.
Preview Translation: This command enables you to preview your template as a PDF file using a specified
XLIFF translation file. This functionality enables you to test translation files.
Localize Template: This command applies a translation file to an RTF template. This means that in your
current RTF template all boilerplate text is translated. The main function of this feature is to create a
language-specific version of a template.
Export
XSL-FO Stylesheet: This function allows you convert the RTF template into an enhanced XSL-FO
stylesheet. This function can be used to generate XSL-FO for debugging or further customization.
FO Formatted XML: This function allows you to apply the XSL-FO style sheet generated from the Word
document to the sample data and save the intermediate FO format. This function is mainly for debugging.
PDF This function converts the Word document to PDF.
Options
This group allows you to change the following options that influence the look and feel of Template Builder:
Display Mode
Preview
Build
You will use all these functions in the coming sections.
3/8/2016 7:07 PM
8 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Note: To work in disconnected mode, you must have a sample data file available in your local work environment. In this example,
the sample data file is Balance.XML.
1 . a. Select Start >Programs >Oracle BIP Desktop >Samples >RTF Templates.
b. Open the Balance Letter folder and load the file Balance Letter Start.rtf. This is a sample template file.
3 . To build a report and view the report with data, you must load sample XML data. When working in disconnected or
Offline mode, you must have sample data stored locally.
a. Click Sample XML in the Load Data group.
3/8/2016 7:07 PM
9 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
b. Select the Balance.xml sample data file located under your local drive(C):\Program
Files\Oracle\BI Publisher\BI Publisher Desktop\samples\RTF templates\Balance
Letter. Click Open.
You will see a confirmation message that the data is loaded successfully.
4 . a. Now insert the various fields in the Balance Letter by replacing the placeholders. Select the <INSERT ADDRESS
HERE> placeholder, and click ab | Field, in the Insert group.
b. In the Field dialog box, select the Customer Name field and click Insert.
3/8/2016 7:07 PM
10 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
5 . The Customer_Name field appears in the Balance Letter. Click the space following the CUSTOMER_NAME field
and press Enter. This adds a line break.
3/8/2016 7:07 PM
11 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
6 . Repeat this process, adding Address Line1. Also, add City, State, and Zip, each of them separated by a comma and
space. The letter should look like this:
7 . a. Insert the following fields into the letter, in the appropriate placeholders:
As_Of_Date
Trx Currency Code
C Inv Open Balance.
Note that you may have to scroll in the Field dialog box to locate these fields.
b. Close the Field Dialog box.
8 . Include the table of invoices by using the Table Wizard. The Table Wizard allows you to add tables, forms, charts,
and other objects.
a. Select the <INSERT TABLE OF INVOICE HERE> placeholder in the form letter. Click Table Wizard in the Insert
group.
3/8/2016 7:07 PM
12 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3/8/2016 7:07 PM
13 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3/8/2016 7:07 PM
14 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
b. Click Next.
11 . You can group your data. You use the Break option to insert either a page break or section break after each
occurrence of a group. In this example you will not select any options. Click Next.
3/8/2016 7:07 PM
15 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
12 . a. Select a sort sequence and indicate the type of data that is being sorted. Select Transaction Date, indicate that
this field is a number, and sort the column in descending order.
b. Click Finish.
13 . The table opens in the template. Observe the codes F (for "Grouping") and E (for "Each") in the table.
14 . Preview this template in PDF format. In the Preview group, click PDF.
The report is displayed with the XML file data that you loaded earlier.
3/8/2016 7:07 PM
16 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
15 . You can view the Word properties of any table field that you have added to your template. Double-click
TRANS_AMOUNT in the table.
The BI Publisher Properties dialog box is displayed.
3/8/2016 7:07 PM
17 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
b. Set the default number and number format. Enter $1,000.00 in the Default number text box and select $#,##0.00
from the Number format drop-down list.
3/8/2016 7:07 PM
18 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3/8/2016 7:07 PM
19 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
18 . Save the template as My Balance Letter in the Learn folder on your local drive.
19 . When you preview this template, the report is displayed with the applied formatting.
3/8/2016 7:07 PM
20 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
22 . On the Catalog page, navigate to the Balance Letter report and click Edit.
This Balance Letter report is part of the Samples files.
3/8/2016 7:07 PM
21 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
24 . Click Upload.
3/8/2016 7:07 PM
22 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
.
d. Click Upload.
26 . The uploaded layout is displayed in the layout editor. Click Save.
3/8/2016 7:07 PM
23 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
In the displayed report, click the Balance Report tab. The report based on the template that you have designed in
Template Builder is displayed.
3/8/2016 7:07 PM
24 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
This concludes the topic on creating a RTF template using Template Builder in Offline mode.
3/8/2016 7:07 PM
25 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
c. Enter the Report Server URL as the BI Publisher Server installed on your machine. For example, http://<host>:
<port>/xmlpserver
d. Click Login.
2 . The Open Template dialog box opens. Select the Salary Reports No Parameters report. (Navigate to
\Shared Folders\Sample Lite\Published Reporting\Reports\)
3/8/2016 7:07 PM
26 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3 . When the report opens, you will not see any data in the blank MS Word document. However, XML data definitions
are loaded from the report to facilitate the definition of a template. Notice that the report name appears in the title
bar of MS Word beside the document name.
3/8/2016 7:07 PM
27 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
5 . Now you will add a chart for this template. Position your cursor in the first row of the word table. In the Insert group,
click Chart.
3/8/2016 7:07 PM
28 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3/8/2016 7:07 PM
29 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Attribute
Values
a.
Type
b.
Style
Earth
c.
Aggregation
Average
f.
Title:Title
3/8/2016 7:07 PM
30 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Click OK.
9 . The chart appears in the template.
3/8/2016 7:07 PM
31 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
10 . Now use the Table wizard to insert the table in your template. You did this in the previous topic, but in Offline mode.
Take your curser to the next row of the MS Word table, and then insert the table.
a. Select Department Name,Manager, Name, Job Title, Annual Salary, and Fed Withheld (in that order). Your
selections should be listed in the right pane of the wizard page.
b. Click Next.
3/8/2016 7:07 PM
32 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
11 . In the How would you like to group your report? section, select the following options:
Group By - Department Name
Group Above
Break - Section
Then By - Manager
Group - Left
Recall that while working on the table in the Offline mode, you did not choose options for grouping. This example
uses section breaks in the report with Department Name as the group and has a second grouping by Managers.
Click Next.
12 . Sort by Annual Salary in the Which fields would you like to use to sort the data? section. Click Finish.
3/8/2016 7:07 PM
33 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
13 . This table appears in the document, below the chart. Right-justify the cell for ANNUAL_SALARY.
3/8/2016 7:07 PM
34 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
15 . Select the PDF preview option from the Preview group. The PDF is displayed. Observe that because you used the
Group above option while inserting the table, a department name appears above each table.
3/8/2016 7:07 PM
35 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
18 . Upload as new dialog box opens. Enter Manager Financials Report as the Template Name.
3/8/2016 7:07 PM
36 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
20 . Navigate to the Salary Report - No Parameters report in the BI Publisher Enterprise Server and click Edit.
21 . The uploaded layout is displayed in the layout editor. Save and then click View Report.
3/8/2016 7:07 PM
37 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
22 . In the displayed report, click the Manager Financials Report tab. The report based on the template you have
designed in Template Builder is displayed.
3/8/2016 7:07 PM
38 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3/8/2016 7:07 PM
39 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
2 . In the BI Publisher ribbon, click Sample XML in the Load Data group.
3 . Navigate to and select RetailSales.xml (located in the same folder as the Retail Sales RTF template), and
click Open. This file contains retail sales data from different industries.
3/8/2016 7:07 PM
40 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
6 . Click Pivot Table in the Insert group. The Pivot Table dialog box opens.
3/8/2016 7:07 PM
41 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
You drag data columns from the Data pane to the blank Layout pane to build a pivot table.
7.
3/8/2016 7:07 PM
42 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
d. Click OK.
9 . The pivot table appears in the template.
3/8/2016 7:07 PM
43 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
10 . Save the template, and then click PDF in the Preview group to view your pivot table.
3/8/2016 7:07 PM
44 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
This concludes the "Working with a Pivot Table in an Existing RTF Template" topic.
Using Template Builder Utilities: Field Browser, Validate Template, and Check
Accessibility
This topic will demonstrate how to use the Field Browser, Check Accessibility, and Validate Template utilities available in
Template Builder.
You will use the Retail Sales.rtf file, which is made available to you at My Templates and Files zip file.
Using Validate Template
Using Field Browser
Using Check Accessibility
3/8/2016 7:07 PM
45 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3/8/2016 7:07 PM
46 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
2 . The Field Browser dialog box shows the default text of the form field in the Text column, and the instructions (from
the help and status text of the form field) in the Code column.
3/8/2016 7:07 PM
47 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Note:
When you select a specific row in the dialog box, the matching form field will be selected in the Microsoft Word
document.
If you select some part of the text before opening the Field Browser, the dialog shows only the fields in your
selection. If no text is selected, Field Browser will show all fields in the document. This screenshot shows all the
fields, because no specific form field was selected before opening Field Browser.
3 . You can update processing instructions directly from the Field Browser dialog box.
a. Select INDUSTRY in the Text column..
3/8/2016 7:07 PM
48 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3/8/2016 7:07 PM
49 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Template Builder provides an accessibility checker to check the template for features to enhance the accessibility of the report for
report consumers who may need assisting technologies to view the report. For more information about developing accessible
reports, see "Designing Accessible Reports" in the Oracle Fusion Middleware Report Designer's Guide for Oracle Business
Intelligence Publisher.
1 . In the BI Publisher tab, in the Tools group, click Check Accessibility.
2 . The tool generates a report indicating areas of your template that do not include the accessibility features.
This template does not have accessibility compatibility for a row header of a table.
For more information about developing accessible reports, see Designing Accessible Reports" in the Oracle Fusion
Middleware Report Designer's Guide for Oracle Business Intelligence Publisher.
3/8/2016 7:07 PM
50 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
covered are:
The UI Options tab allows you to change some options that influence the look and feel of Template Builder.
The Preview Options tab allows you to specify options that influence the Preview functionality of Template Builder.
The Build Options tab allows you to specify options that influence how Template Builder generates tables and forms.
Setting UI Options
Setting Preview Options
Setting Build Options
Setting UI Options
The tree view showing the data source can show either the correct XML tag names of the data source or a slightly modified
version that is easier to read.
Select the Element Names for Reports XML option to show the modified labels. These labels contain no <> characters,
use title case capitalization and use spaces instead of underscores.
3/8/2016 7:07 PM
51 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Style Template
If you have a BI Publisher style template available locally you can specify it here. The style information in the style template
is applied to RTF layouts at runtime to achieve a consistent look and feel for your enterprise reports. In this example no
style template is defined.
For more information, see "Creating and Implementing Style Templates" in the Oracle Fusion Middleware Report
Designer's Guide for Oracle Business Intelligence Publisher.
Locale
You can choose the language and territory used for previewing your template. While this change will not automatically
translate any files, it is important to set the correct locale for the preview to use the correct direction of the text (left-to-right
or right-to-left), and to correctly set locale-specific date, number, and currency formats. In this example the Locale is set to
English - United States [en-US]
Java Home
The Preview (and export functionality) requires Java code. You can change the path to your JAVA HOME directory. If this
option is not specified, Template Builder assumes that the Java virtual machine (java.exe) is accessible in the PATH
specified in your environment variables of Windows. In this example it is set as C:\Program Files\Java\jre6
Java Option
Specify the memory to reserve for Template Builder to process the template. The default value is -Xmx256M. The example
shows the same.
3/8/2016 7:07 PM
52 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
3/8/2016 7:07 PM
53 of 53
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/...
Summary
In this tutorial, you have learned how to:
Install Template Builder successfully
Create an RTF template in the Offline mode
Create an RTF template in the Online mode
Create a chart and a pivot table in an existing template
Configure Template Builder settings
Resources
Oracle by Example - Business Intelligence Enterprise Edition
Oracle Learning Library - Home
Credits
Lead Curriculum Developer: Sindhu Rao
Other Contributors: Kasturi Shekhar, Mike Donohue, Pradeep Sharma, and Daniel Milne
3/8/2016 7:07 PM