Professional Documents
Culture Documents
Tbwordbip
Tbwordbip
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:
*
*
*
*
*
*
*
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 11/g/
<http://apex.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PREV_P
AGE:5722,2>,
and also in the Instructor Led Training (ILT) for BI Publisher 11/g/.
Prerequisites
To complete this tutorial, you should:
* Download the *My Templates and Files
<http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/tb4wor
d/files/My%20Templates%20and%20Files.zip>*
zip file, and unzip in a folder with the same name.
* Create a Learn folder on your hard drive.
* Have access to the Samples files available in the Publisher Desktop
Program menu.
* You will be using some of the reports that are similar to the ones
you created in the OBE ' Getting Started with Oracle Business
Intelligence Publisher
<http://apex.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PR
EV_PAGE:5081,2>'.
These reports are provided to you in the My Templates and Files zip
file.
* Complete the Getting Started with Oracle Business Intelligence
Publisher
<http://apex.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PR
EV_PAGE:5081,2>
OBE mentioned above.
* Install the required software.
The assumption throughout this course is that you are familiar with the
basic user interface and navigation of the Oracle BI Publisher.
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
Template Builder can be downloaded from the Get Started region of the
Oracle BI Publisher Home page or Oracle BIEE Home page. In this topic,
you will download the Template Builder add-in and install it.
Perform the following steps to download and install Template Builder:
1 .
2 .
In the Get Started section of the Home page, click the *Download BI
Publisher Tools* menu, and select *Template Builder for Word*.
5 .
*a.* After the Install Shield wizard starts, follow the on-screen
instructions to complete the installation.
Show Screenshot for Step
*b.* Click *Finish. *
Show Screenshot for Step
6 .
zip file, as well as in Sample after you install the Template Builder.)
1 .
*a.* Select *Start >**Programs >Oracle BIP Desktop >Samples >RTF Templates*.
Show Screenshot for Step
*b. *Open the *Balance Letter* folder and load the file *Balance Letter
Start.rtf*. This is a sample template file.
Show Screenshot for Step
2 .
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.
Show Screenshot for Step
*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.
Show Screenshot for Step
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.
Show Screenshot for Step
*b.* In the Field dialog box, select the *Customer Name* field and
click*Insert.*
Show Screenshot for Step
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.
Show Screenshot for Step
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:
Show Screenshot for Step
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.
Show Screenshot for Step
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.
Show Screenshot for Step
The Table Wizard opens.
Show Screenshot for Step
*b.* Accept the default (Table) and click *Next.*
9 .
The Table Wizard intuitively selects the correct data set for you. In
this example, it is /ARXCOBLX/G_CUSTOMER/G_CURRENCY/G_INVOICES. Accept
the default and click *Next.*
Show Screenshot for Step
You can change this, however, by clicking the drop-down list.
10 .
Trx Number
Transaction Date
Trans Amount
Trans Amount (Second "Trans Amount" is Trans Amount Remaining)
Use the shuttle icons Show Screenshot for Step to move items to the
selected column one at a time or use the double-headed shuttle icons to
move all columns at once.
Use the resequence icons Show Screenshot for Step to move the columns up
and down.
Show Screenshot for Step
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.*
Show Screenshot for Step
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.
Show Screenshot for Step
*b.* Click *Finish.*
13 .
The table opens in the template. Observe the codes F (for "Grouping")
and E (for "Each") in the table.
Show Screenshot for Step
14 .
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.
Show Screenshot for Step
Click the *Word Properties* button to edit the inserted fields.
16 .
*a.* In the Text Form Field Options dialog box, select *Number* from the
Type drop-down list.
Show Screenshot for Step
*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.
Show Screenshot for Step
*c.* Click *OK*. The template is displayed with the applied formatting.
Show Screenshot for Step
*d.* Right-justify this Trans Amount field by using MS Word Paragraph menu.
17 .
You can format the other fields as per your requirement. However,
because the date is a text field in this example, you will not be able
to format it.
You can also format the column names of the table to a meaningful
display using the MS Word menu. Change the column names as given below
and then keep the formatting as Bold.
*
*
*
*
Save the template as *My Balance Letter* in the Learn folder on your
local drive.
Show Screenshot for Step
19 .
When you preview this template, the report is displayed with the applied
formatting.
Show Screenshot for Step
20 .
Click *Upload.*
Show Screenshot for Step
25 .
1 .
The Open Template dialog box opens. Select the *Salary Reports
No
Parameters* report. (Navigate to \Shared Folders\Sample Lite\Published
Reporting\Reports\)
Show Screenshot for Step
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.
Show Screenshot for Step
4 .
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.*
Show Screenshot for Step
6 .
8 .
Attribute
Values
a.
Type
Style
Earth
c.
Aggregation
Average
f.
Title:Title
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.
Show Screenshot for Step
*b.* Click *Next.*
11 .
In the *How would you like to group your report? *section, select the
following options:
*
*
*
*
*
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.
Show Screenshot for Step
Click*Next. *
12 .
Sort by *Annual Salary* in the *Which fields would you like to use to
sort the data?* section. Click *Finish.*
Show Screenshot for Step
13 .
This table appears in the document, below the chart. Right-justify the
cell for *ANNUAL_SALARY*.
Show Screenshot for Step
14 .
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.
Show Screenshot for Step
16 .
Upload as new dialog box opens. Enter Manager Financials Report as the
Template Name.
Show Screenshot for Step
19 .
The uploaded layout is displayed in the layout editor. Save and then
click*View Report. *
Show Screenshot for Step
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.
Show Screenshot for Step
This concludes "Building an RTF Template in Online Mode" topic.
Working with a Pivot Table in an Existing RTF Template
This topic covers adding a pivot table to an existing RTF template. You
will open an existing RTF template to preview a chart, and add a pivot
table to the template. The RTF template Retail Sales.rtf
<http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/tb4word/fi
les/My%20Templates%20and%20Files.zip>
is stored in the My Templates and Files
<http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/tb4word/fi
les/My%20Templates%20and%20Files.zip>
zip file.
1 .
Open the *Retail Sales.rtf* file in MS Word. The file looks like this:
Show Screenshot for Step
2 .
In the BI Publisher ribbon, click *Sample XML* in the Load Data group.
Show Screenshot for Step
3 .
Click *Enter* twice to enter a line break after the PIE Chart.
Show Screenshot for Step
6 .
Click *Pivot Table* in the *Insert *group. The Pivot Table dialog box opens.
Show Screenshot for Step
You drag data columns from the Data pane to the blank Layout pane to
build a pivot table.
7 .
*a.* Drag *Year* to*Column*
*b.* Drag *Month* to *Column*
*c. *Drag *Industry* to *Row*
*d. *Drag*Sales* to the *Please drop data here* area.
Show Screenshot for Step
8 .
Save the template, and then click *PDF *in the Preview group to view
your pivot table.
Show Screenshot for Step
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 theRetail Sales.rtf
<http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/tb4word/fi
les/My%20Templates%20and%20Files.zip>file,
which is made available to you at My Templates and Files zip file.
Using Validate Template
1 .
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.
Show Screenshot for Step
*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..
Show Screenshot for Step
The *Edit* field shows the processing instructions.
*b.* Change all but the first of the capital letters of the word
*INDUSTRY* to lowercase. In other words, change *INDUSTRY* to *Industry*.
*c.* Select *Update*.
Show Screenshot for Step
Observe that the code is changed as per your edit.
*Note: *Recall from the previous topic that you can use Field Browser to
find out validation errors in the template. Use the Find option in the
Field Browser to search for the errors.
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.
Show Screenshot for Step
Setting Preview Options
The Preview tab allows you to specify options that influence the Preview
functionality of Template Builder.
The various options that you can set using this dialog are:
*
*
*
*
Style Template
Locale
Java Home
Java Option
Use the Build tab to specify options that influence how Template Builder
generates tables and forms.
The various Build options that you can set here are:
* For-each form field
* Form field size
* Table Header Color
Show Screenshot for Step
For-each form field
Use this to choose how the Template Builder creates the form fields for
processing instructions in the Insert Table/Form dialog box. The
*Descriptive *option (for example: for-each Invoice) renders a
descriptive form field for the processing instructions. This option
makes the layout template easier to understand. However, the longer
fields may distract from the visual layout of the template. The
*Abbreviated* option (for example: F) provides a one letter abbreviation
for each instruction.
Select the *Hidden *option to generate the processing instruction form
fields using Microsoft Word's hidden font effect. Hidden text is hidden
in the print preview. You can display or hide the hidden text by
selecting or deselecting the Hidden text
option in the Display options
of Microsoft Word Options.
Form field size
The *Large* option inserts the BI Publisher code in a document variable.
The document variable field can accommodate approximately 48 kilobytes
of code line.
Note that this setting affects only fields that are created or edited
while this option is set.
Table Header Color
When you insert a table by using the Table Wizard or the Insert
Table/Form dialog box, the Template Builder applies the table header
color specified here to the table header background. Use this feature to
customize the default color for your templates.
Generate XSLT 2.0 compliant code
BI Publisher uses the XSLT processor provided by Oracle XDK 11.1.0.7.0,
which supports the W3C XSL Transformations 1.0 recommendation. The
processor also implements the current working drafts of the XSLT and
XPath 2.0 standards. For more information about Oracle XDK see Oracle
XML Developer's Kit Programmer's Guide 11g.
By default, BI Publisher is compatible with XSLT 1.0. If you wish to use
XSLT and XPath 2.0 features in your template enable this option. This
configuration is performed at the template level. The template-level
setting will override the server setting.
This concludes the "Setting Configuration Options for Template Builder"
topic.
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
<http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/tutorial
s/index.html>
* Oracle Learning Library - Home <http://www.oracle.com/goto/oll>
Credits
* *Lead Curriculum Developer:* Sindhu Rao
* *Other Contributors:* Kasturi Shekhar, Mike Donohue, Pradeep Sharma,
and Daniel Milne
<http://www.oracle.com/us/corporate/index.html>
Copyright 2011,
Oracle and/or its affiliates. All rights reserved
<http://www.oracle.com/corporate/index.html><http://www.oracle.com/html/privacy.
html>