Está en la página 1de 182

Oracle BI Publisher 10g R3:

Fundamentals
Activity Guide
D53147GC10
Edition 1.0
February 2008
D54123
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Copyright 2008, Oracle. All rights reserved.
Disclaimer
This document contains proprietary information and is protected by copyright and
other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered
in any way. Except where your use constitutes "fair use" under copyright law, you
may not use, share, download, upload, copy, print, display, perform, reproduce,
publish, license, post, transmit, or distribute this document in whole or in part without
the express authorization of Oracle.
The information contained in this document is subject to change without notice. If you
find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Restricted Rights Notice
If this documentation is delivered to the United States Government or anyone using
the documentation on behalf of the United States Government, the following notice is
applicable:
U.S. GOVERNMENT RIGHTS
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or
disclose these training materials are restricted by the terms of the applicable Oracle
license agreement and/or the applicable U.S. Government contract.
Trademark Notice
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other
names may be trademarks of their respective owners.
Authors
Padmaja Mitravinda
Brian Pottle
Technical Contributors
and Reviewers
Leta Davis
Tim Dexter
Mike Donahue
Tim McGlue
Nickos Psomas
Pradeep Sharma
Kasturi Shekhar
Jason Stoddart
Editors
Daniel Milne
Susan Moxley
Nita Pavitran
Graphic Designers
Satish Bettegowda
Rajiv Chandrabhanu
Publishers
Srividya Rameshkumar
Giri Venugopal
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y

iii

Contents


Practice 3: Create Simple XML Files ........................................................................... 1
Practice 3-1: Create an XML File for Employee Data ........................................... 2
Practice 3-2: Create an XML File for Department Data......................................... 5
Practice 3-3: Create an XML File that Combines Employee and
Department Data................................................................................................... 8
Practice 4: Creating Simple Reports Based on Oracle Database.............................. 11
Practice 4-1: Getting Started............................................................................... 12
Practice 4-2: Creating a Report Based on Oracle Database............................... 16
Practice 5: Creating RTF Templates Using BI Publisher Desktop............................. 27
Practice 5-1: Create an RTF Template for a Sample Report .............................. 28
Practice 5-2: Using Charts Within BI Publisher ................................................... 33
Practice 5-3: Create an RTF Template by Using the Basic Method.................... 35
Practice 5-4: Create an RTF Template by Using the Form Field Method ........... 36
Practice 5-5: Create and Publish an RTF Template for BI Publisher Reports .... 39
Practice 6: Advanced RTF Template Techniques ..................................................... 47
Practice 6-1: Use MS Word Features to Modify a Template............................... 48
Practice 6-2: Create a Base Template ................................................................ 63
Practice 6-3: Modify the Template and Combine Data........................................ 66
Practice 6-4: Modify the TemplateAdd a Total................................................. 68
Practice 6-5: Modify the TemplateSummarize and Total ................................. 70
Practice 6-6: Modify the TemplateAdd Headers and Footers.......................... 71
Practice 6-7: Additional Challenge 1 ................................................................... 72
Practice 6-8: Additional Challenge 2Create a Report Template and
Use Form Field Tools.......................................................................................... 73
Practice 6-9: Additional Challenge 3Create a Crosstab Report
and RTF Template .............................................................................................. 80
Practice 7: Creating BI Publisher Reports with Parameters, Lists of Values, and
Hyperlinks .................................................................................................................. 89
Practice 7-1: Adding a Parameter and a List of Values to a Report .................... 90
Practice 7-2: Creating a Report with Hyperlinks.................................................. 96
Practice 9: Oracle BI Publisher Server: Administration............................................ 105
Practice 9-1: Defining the Data Sources ........................................................... 106
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y

iv
Practice 9-2: Defining Users and Roles ............................................................ 108
Practice 9-3: Setting Up Delivery Options: Email .............................................. 113
Practice 10: Scheduling Reports and Analyzing Data ............................................. 115
Practice 10-1: Scheduling BI Publisher Reports and Managing the
Scheduled Reports............................................................................................ 116
Practice 10-2: Scheduling a Report With Advanced Options: Bursting
to a File Location............................................................................................... 122
Practice 10-3: Scheduling a Report to Be Delivered as an Email Attachment .. 130
Practice 10-4: Analyzing Data by Using Online and Excel Analyzers............... 133
Practice 12: Create XML Data Templates ............................................................... 141
Practice 12-1: Create a Simple XML Data Template ........................................ 142
Practice 12-2: Data Templates: Using RTF Templates, Parameters,
and LOVs .......................................................................................................... 145
Practice 13: Building a BI Publisher Report Using an Oracle BI EE Subject Area .. 157
Practice 14: Creating BI Publisher Reports Based on Other Data Sources ............ 161
Practice 14-1: Create BI Publisher Report Based on Web Services................. 162
Practice 14-2: Create BI Publisher Report Based on XML/RSS Feeds ............ 170
Practice 14-3: Create a BI Publisher Report Based on a File ........................... 174



































O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
Oracle BI Publisher 10g R3: Fundamentals 1
Practice 3: Create Simple XML Files
Goal
To practice basic XML coding techniques that illustrate fundamental elements of XML file
structure
Scenario
You create two XML files that contain employee and department data. You then combine
the data from both files to create a third XML file that contains data that organizes
employees by department.
Outcome
You will view the XML documents in the Internet Explorer (IE) browser.
Time
30 minutes
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
2 Oracle BI Publisher 10g R3: Fundamentals
Practice 3-1: Create an XML File for Employee Data

Overview
Using a text editor, create an employee.xml text file. You will include the XML declaration in the prologue,
identify the root element, and create the root element tabs. Additionally, you will include company employee
data within the root element string. Use the table below as reference for the employee data:
Employee Table
Employee ID First Name Last Name Salary Department ID
103 Alexander Hunold 9000 10
104 Bruce Ernst 6000 10
105 David Austin 4800 10
106 Valli Pataballa 4600 20
107 Diana Lorentz 4200 20
108 Fred Inghram 6000 20

Finally, you will save your file and view your XML document in the IE browser.
Tasks

Create and Add Elements to an Employee XML File
1. Open a file in your text editor and create a document called employee.xml. Save the file in the
D:\Labs\BIP_10.1.3.3_Labs directory. Make sure to save it as a text file.
2. Add the following XML declaration in the prologue.
<?xml version="1.0" encoding="windows-1252" ?>
3. For the Employee table, create the root element and root element tags. The root element will be
employees, and the tags should look like this:
<employees> </employees>

4. Within the root element, place the string Company Employee Data as follows:
<employees>Company Employee Data</employees>
5. Save the employee.xml file.
6. View the XML document in the IE browser. In Windows Explorer, double-click the employee.xml file
that you saved in the D:\Labs\BIP_10.1.3.3_Labs directory. It should appear as follows:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
Oracle BI Publisher 10g R3: Fundamentals 3
7. Between the root element tags, remove the Company Employee Data string, and create the start and
end tags for an element called employee, like this:
<employees>
<employee>
</employee>
</employees>
8. Between the employee tags, create the tags that will hold the employee data. (The tags should match the
information in the Employee table.) Put comment elements between each start and end tag. When done,
the additional tags should look like this:
<employee>
<employee_id><!-- id --></employee_id>
<first_name><!-- first name --></first_name>
<last_name><!-- last name --></last_name>
<salary><!-- salary --></salary>
<department_id><!-- department_id --></department_id>
</employee>
9. Save your file.
10. View the XML document in the IE browser. In Windows Explorer, double-click the employee.xml file
that you saved in the D:\Labs\BIP_10.1.3.3_Labs directory. It should appear as follows:

Add Employee Data to the XML File
11. Using the employee data tags that you created, enter the employee information from the first record in the
Employee table into your XML file, like this:
<employee>
<employee_id>103</employee_id>
<first_name>Alexander</first_name>
<last_name>Hunold</last_name>
<salary>9000</salary>
<department_id>10</department_id>
</employee>
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
4 Oracle BI Publisher 10g R3: Fundamentals
12. Copy and past the employee data tags to create an XML entry for each employee (there should be six
sets of employee data tags when you are done). Then, enter the employee information from the
remaining records in the Employee table into your XML file.
13. Save your file.
14. View the XML document in the IE browser. In Windows Explorer, double-click the employee.xml file
that you saved in the D:\Labs\BIP_10.1.3.3_Labs directory. It should appear as follows:



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
Oracle BI Publisher 10g R3: Fundamentals 5
Practice 3-2: Create an XML File for Department Data
Overview
Using a text editor, create a department.xml text file. Using the same techniques as in the previous practice,
you will include the XML declaration in the prologue, identify the root element, and create the root element
tabs. Additionally, you will include company department data within the root element string. Use the table
below as reference for the employee data:
Department Table
Department ID Dept Name Division Region
10 Sales Avis East
20 Technology Avis East
30 Sales Budget West
40 Technology Budget West
Tasks
Create and Add Elements to a Department XML File
1. Open a file in your editor and create a document called department.xml. Save the file in the
D:\Labs\BIP_10.1.3.3_Labs directory. Make sure to save it as a text file.
2. Add the following XML declaration in the prologue.
<?xml version="1.0" encoding="windows-1252" ?>
3. For the Department table, create the root element and root element tags. The root element will be
departments, and the tags should look like this:
<departments> </departments>
4. Between the root element tags, create the start and end tags for an element called department. Then,
between the department element tags, create the tags that will hold the department data. Put comment
elements between each start and end tag. The modified root element should now look like this:
<departments>
<department>
<department_id><!-- ID --></department_id>
<dept_name><!-- Department Name --></dept_name>
<division><!-- Division --></division>
<region><!-- Region --></region>
</department>
</departments>
5. Save your file.
6. View the XML document in the IE browser. In Windows Explorer, double-click the department.xml file
that you saved in the D:\Labs\BIP_10.1.3.3_Labs directory. It appears as follows:
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
6 Oracle BI Publisher 10g R3: Fundamentals

Add Department Data to the XML File
7. Using the department data tags that you just created, enter the department information from the first
record in the Department table into your XML file. Then, copy and paste the set of department tags until
you have a set of four (the Department table has four rows). Finally, change the department data to
match the data in the Department table. When you are done, the XML file should look like this:
<?xml version="1.0" encoding="windows-1252" ?>
<departments>
<department>
<department_id>10</department_id>
<dept_name>Sales</dept_name>
<division>Avis</division>
<region>East</region>
</department>
<department>
<department_id>20</department_id>
<dept_name>Technology</dept_name>
<division>Avis</division>
<region>East</region>
</department>
<department>
<department_id>30</department_id>
<dept_name>Sales</dept_name>
<division>Budget</division>
<region>West</region>
</department>
<department>
<department_id>40</department_id>
<dept_name>Technology</dept_name>
<division>Budget</division>
<region>West</region>
</department>
</departments>
8. Save your file.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
Oracle BI Publisher 10g R3: Fundamentals 7
9. View the XML document in the IE browser. In Windows Explorer, double-click the department.xml file
that you saved in the D:\Labs\BIP_10.1.3.3_Labs directory. It should appear as follows:

10. Close the browser, but leave the department.xml file open in your text editor.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
8 Oracle BI Publisher 10g R3: Fundamentals
Practice 3-3: Create an XML File that Combines Employee and
Department Data
Overview
In this practice, you combine the data from the employee and department XML files.
Tasks
Combine the Departments with Their Associated Employees
1. With the department.xml file open in your text editor, perform a Save As. Save the file in the
D:\Labs\BIP_10.1.3.3_Labs directory as a text file, and name the file as empdept.xml.
2. Using your text editor, open the employee.xml file in a new window.
3. Copy and paste employee data (including the appropriate employee tags) into the empdept.xml file so
that employees are organized by department, as follows:
<?xml version='1.0' encoding='windows-1252'?>
<departments>
<department>
<department_id>10</department_id>
<dept_name>Sales</dept_name>
<division>Avis</division>
<region>East</region>
<employee>
<employee_id>103</employee_id>
<first_name>Alexander</first_name>
<last_name>Hunold</last_name>
<salary>9000</salary>
</employee>
<employee>
<employee_id>104</employee_id>
<first_name>Bruce</first_name>
<last_name>Ernst</last_name>
<salary>6000</salary>
</employee>
<employee>
<employee_id>105</employee_id>
<first_name>David</first_name>
<last_name>Austin</last_name>
<salary>4800</salary>
</employee>
</department>
<department>
<department_id>20</department_id>
<dept_name>Technology</dept_name>
<division>Avis</division>
<region>East</region>
<employee>
<employee_id>106</employee_id>
<first_name>Valli</first_name>
<last_name>Pataballa</last_name>
<salary>4800</salary>
</employee>

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
Oracle BI Publisher 10g R3: Fundamentals 9
<employee>
<employee_id>107</employee_id>
<first_name>Diana</first_name>
<last_name>Lorentz</last_name>
<salary>4200</salary>
</employee>
<employee>
<employee_id>108</employee_id>
<first_name>Fred</first_name>
<last_name>Inghram</last_name>
<salary>6000</salary>
</employee>
</department>
<department>
<department_id>30</department_id>
<dept_name>Sales</dept_name>
<division>Budget</division>
<region>West</region>
</department>
<department>
<department_id>40</department_id>
<dept_name>Technology</dept_name>
<division>Budget</division>
<region>West</region>
</department>
</departments>
4. Save your file.
5. View the XML document in the IE browser. In Windows Explorer, double-click the empdept.xml file that
you saved in the D:\Labs\BIP_10.1.3.3_Labs directory. It should appear as follows, with employees
organized into departments 10 and 20:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 3: Introduction to XML Standards
10 Oracle BI Publisher 10g R3: Fundamentals

6. Close the browser, and close the .xml files.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report
Oracle BI Publisher 10g R3: Fundamentals 11
Practice 4: Creating Simple Reports Based on Oracle
Database
Goal
To create BI Publisher reports based on Oracle Database
Scenario
You query data from the OE +HR schema and edit the results.
Outcome
You will save the reports created in a folder in BI Publisher.
Time
3040 minutes
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report

12 Oracle BI Publisher 10g R3: Fundamentals
Practice 4-1: Getting Started
Overview
In this practice, you log in to BI Publisher as Administrator and explore the preferences.
Assumptions

You should have:
Oracle Database 10g (preferably 10.2) with the sample schemas (especially HR, OE, and SH),
Oracle BI Publisher 10.1.3.3 (installed along with Oracle BI Enterprise Edition)
Database, OC4J, and other required BI EE services up and running
Tasks
Signing In to Oracle BI Publisher

1. From the Windows Start menu, select All Programs > Oracle Business Intelligence > BI Publisher.
(You can also enter the URL for BI Publisher in a browser window using the following format:
http://<hostname>:<port>/xmlpserver/. For example, the URL may look like:
http://localhost:9704/xmlpserver/.)
2. In the sign-in screen for BI Publisher, enter Administrator as the username and password, and click
Sign In.






















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report
Oracle BI Publisher 10g R3: Fundamentals 13

When you sign in, the Welcome page is displayed:


Note: When you sign in as the Administrator, the Welcome page displays the Reports, Schedules, and Admin
tabs. Users who do not have Administrator privileges do not see the Admin tab.
Setting Preferences

3. Click the Preferences link. This has two tabs, General Preferences and Account. Observe the settings
in the General Preferences and Account pages, accept the defaults, and do not change any settings.

Open and View an Existing Report in BI Publisher

4. Click the Reports tab, and then click the Shared Folders link.
5. This displays all the shared folders with predefined reports. Click the Revenue by Region report listed
under the Executive folder to open this report.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report

14 Oracle BI Publisher 10g R3: Fundamentals





6. This opens the report in View mode. Select Charts as the Template and PDF as the format, and then
click View again to view the report data using the options selected.
(Note: The report has predefined templates uploaded to view the report.)



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report
Oracle BI Publisher 10g R3: Fundamentals 15
7. The report appears in PDF format, as shown below. Scroll down to see the entire report.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report

16 Oracle BI Publisher 10g R3: Fundamentals
Practice 4-2: Creating a Report Based on Oracle Database
Overview
In this practice, you define a JDBC connection, create a folder, and then create and edit a report. You also
view the XML data generated in the report.
Assumptions
You have administrator privileges to define the JDBC connection, and have access to the OE and
other samples schemas of the database.
The OE account is unlocked in the database, if not log in to SQL* Plus as the sys user (check with
your instructor whether the OE account is unlocked) and execute the following command:

SQL> alter user oe identified by oracle account unlock;
Tasks

Creating a JDBC Connection (demo) to the OE Schema
1. Click the Admin tab. Click JDBC Connection under the Data Sources section of the page.



2. In the JDBC Data Sources screen that appears, click demo to edit the connection details for this data
source.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report
Oracle BI Publisher 10g R3: Fundamentals 17

3. In the Update Data Source screen, enter the following details:
Connection String: jdbc:oracle:thin:@<Host name>: <Port>:<SID>
(For example, jdbc:oracle:thin:@myhost:1521:orcl)
Note: Check with your instructor for the database connection string, port, and SID details, and also the
OE user credentials.
User Name: oe
Password: <Password for OE user> (set as oracle in using the SQL statement given in the
assumptions)
Database Driver Class: oracle.jdbc.driver.OracleDriver (This is the default.)
Click Test connection. When the connection is successfully tested, click Apply.




Creating a Folder (Learn) in BI Publisher
4. Click Home to return to the home page. Click My Folders, and then click the Create a New Folder link
(found in the Folder and Report Tasks section).
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report

18 Oracle BI Publisher 10g R3: Fundamentals
Enter Learn as the folder name and click Create. (You will save the reports that you create in this folder.)


Creating and Editing a Simple Employee Salary Report

5. Navigate to My Folders > Learn, and click Create a New Report (in the Folder and Report Tasks
section). Enter Based on OracleDB as the name of the report, and click Create. The report is created
and displayed in the Learn folder.






6. Click the Edit link found under the name of the report, to open it in Edit mode.
In the General Settings section of the Report Properties pane, select demo from the Default Data Source
drop-down list.
Every time you modify a report, you need to save the changes. Click the Save icon (found at the top-
left corner).
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report
Oracle BI Publisher 10g R3: Fundamentals 19



7. In the Report navigation list, click the Data Model node, and then click New.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report

20 Oracle BI Publisher 10g R3: Fundamentals
8. In the Data Set screen that appears, ensure that the following options are selected:
Type: SQL Query
Data Source: demo
Cache Results
Then, click Query Builder to define the query.


9. In the Query Builder screen, select HR from the Schema drop-down list. Result: HR schema objects
appear in the left pane. Perform the following:
a. Click the EMPLOYEES and DEPARTMENTS tables to add them to the Model canvas on the
right.
b. Define a join between these two tables as follows:
- Click the box beside the DEPARTMENT_ID column in the DEPARTMENTS table.
- Click the box beside the DEPARTMENT_ID column in the EMPLOYEES table.
Result: The boxes turn to light gray, indicating that they are marked for joins. When the
second box is selected, a fine line appears in the Model canvas, indicating that the tables are
joined.
c. Select the check box for each of the following columns:
- In the EMPLOYEES table: FIRST_NAME, LAST_NAME, HIRE_DATE, and SALARY
- In the DEPARTMENTS table: DEPARTMENT_NAME

Result: The screen should look like this:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report
Oracle BI Publisher 10g R3: Fundamentals 21


d. Click Conditions as shown below. Move the DEPARTMENT_NAME column using the
icons to move the column up, so that the order looks like this:



e. Click Results to see how the query results appear in Query Builder.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report

22 Oracle BI Publisher 10g R3: Fundamentals
f. Click Save to save the query. Result: The Data Set screen appears with the generated SQL
Query. Click Save again to save the changes to the report.



g. Click the View link at the top of the screen to open the report in View mode. Click View
again to view the XML data:


Note: You can actually view the data in a formatted fashion using a template. So the next
step is to create an RTF template for this report. Creating and publishing RTF templates is
covered in the next two lessons. However, you will upload an existing template for the report
to view data in this practice.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report
Oracle BI Publisher 10g R3: Fundamentals 23
10. If required, you can further edit the SQL query manually. For example, instead of displaying the
FIRST_NAME and LAST_NAME columns separately, you may want to concatenate these columns and
display this as a single column: EMPLOYEE_NAME.
Click the Edit link to return to Edit Mode. Select New Data Set 1 under the Data Model node to display
the SQL query. Modify the query like this:

select DEPARTMENTS.DEPARTMENT_NAME as DEPARTMENT_NAME,
EMPLOYEES.FIRST_NAME || ' '||EMPLOYEES.LAST_NAME as EMPLOYEE_NAME,
EMPLOYEES.HIRE_DATE as HIRE_DATE,
EMPLOYEES.SALARY as SALARY
from HR.DEPARTMENTS DEPARTMENTS,
HR.EMPLOYEES EMPLOYEES
where DEPARTMENTS.DEPARTMENT_ID=EMPLOYEES.DEPARTMENT_ID
Note: Ensure that a space is included in the query (as in the example) between the FIRST_NAME and
LAST_NAME columns in the concatenation string of EMPLOYEE_NAME. In addition, once you have
edited the query manually, you will not be able to edit the query in Query Builder. The query is provided
as the Prac4-2-10_Query.txt file so that you can also copy and paste the query from the file.
Click Save again to save the changes to the query.
11. Using the same techniques as specified previously, view the XML data for the resulting report.



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report

24 Oracle BI Publisher 10g R3: Fundamentals
Uploading an Existing Template for the Report and Viewing Data

12. Ensure that you are signed in to BI Publisher. Navigate to My Folders> Learn folder. Click the Edit link
below the name of the Based on OracleDB report to open it in Edit mode.
13. Click Layouts in the Report pane on the left. This displays the Create Layouts section on the right, click
Browse in Manage Template Files section.
14. Navigate to D:\Labs\BIP_10.1.3.3_Labs\Templates folder (on your local system) where the RTF template
file is saved (or check with your instructor for the location of the template file), select
Simple_SalRep.rtf file, and click Upload to upload the RTF template for the report. (A portion of the
screen is displayed below.)



15. Click Layouts again, and click New to create a new report Layout to associate it with the uploaded
template.


16. In the Layout section that is displayed on the right, enter SalRep_SimpleTemplate as the name of the
template, and ensure that the RTF file uploaded is selected from the Template drop-down list.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report
Oracle BI Publisher 10g R3: Fundamentals 25

17. Ensure that RTF Template is selected as the template type, and select All Formats as the output format
(so that you will be able to view this report in all supported formats in BI Publisher). Click the Save icon
to save the report.



18. Click View to open the report in View mode. Select the SalRep_SimpleTemplate from the Template
drop-down list and HTML as the format, and click View again. You can see that the report is displayed
using the simple template that you have uploaded in HTML format in BI Publisher:



Note: You will create many RTF templates in the next two lesson practices.




















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 4: Getting Started with BI Publisher: Creating a Simple Report

26 Oracle BI Publisher 10g R3: Fundamentals

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 27
Practice 5: Creating RTF Templates Using BI Publisher
Desktop
Goal
To create RTF templates using BI Publisher Desktop
Scenario
You create simple RTF templates using BI Publisher Desktop for the sample reports. Also,
you create a simple template for the BI Publisher report that you created in Practice 4 and
publish this template.
Outcome
You will save the templates created as RTF files and preview the report data using the
templates created in various formats, such as PDF and RTF.
Time
5060 minutes
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
28 Oracle BI Publisher 10g R3: Fundamentals
Practice 5-1: Create an RTF Template for a Sample Report
Overview
In this practice, you create a BI Publisher report using a sample template and data.
Assumptions
Use Microsoft Word to update a template.
Sample template location: D:\Program Files\Oracle\BI Publisher\BI Publisher
Desktop\samples\RTF templates\Balance Letter\Balance Letter Start.rtf
Sample data location: D:\Program Files\Oracle\BI Publisher\BI Publisher
Desktop\samples\RTF templates\Balance Letter\Balance.xml
Tasks
Insert Fields into the Template and Preview the Results
1. Open Microsoft Word. Open the file D:\Program Files\Oracle\BI Publisher\BI Publisher
Desktop\samples\RTF templates\Balance Letter\Balance Letter Start.rtf. Notice
the Template Builder toolbar, which has Data, Insert, Preview, Tools, and Help menus.

2. In Word, select Data > Load XML Data. Select the following XML sample report data: D:\Program
Files\Oracle\BI Publisher\BI Publisher Desktop\samples\RTF templates\Balance
Letter\Balance.xml.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 29
Click Open to load the selected data file.
Click OK to acknowledge that the data loaded successfully.






3. Select Insert > Field to add the following fields to the Balance Letter:
Replace the <INSERT ADDRES HERE> marker with the fields Customer Name, Address Line1,
Address Line2, Address Line3, Address Line4, City, State, and Zip. Format into an appropriate
address block.
Replace the <INSERT AS OF DATE HERE> marker with the As Of Date field.
Replace the <INSERT_CURRENCY_HERE> marker with the Trx Currency Code field.
Replace the <INSERT CURRENCY BALANCE HERE> marker with the C Inv Open Balance field.
4. Close the Field dialog box, and then save the file as you progress as Balance Letter.rtf.
5. Preview your progress by selecting the format (PDF, HTML, RTF, EXCEL) of your choice. Select
Preview > RTF or other formats. (Close the preview window.)



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
30 Oracle BI Publisher 10g R3: Fundamentals
For example, the RTF preview should look like this:











Insert a Table into the Template and Preview the Results
6. Select Tools > Options. In the Options dialog box, click the Build tab. In the For-each form field
section, select Descriptive. Click OK.

7. In the template, select the <INSERT TABLE OF INVOICES HERE> marker.
8. Select Insert > Table/Form to replace the marker using this option. Perform the following steps:
Select the following source data fields (when done, these fields should be in the Template pane):
G Invoices
Trx Number
Transaction Date
Trans Amount
Trans Amount Remaining
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 31
Click G Invoices to preview the table, and then click OK to insert the table.


9. In the template, change the properties of the TRANS_AMOUNT field by right-clicking the
TRANS_AMOUNT field and then selecting the following properties:
Type: Number
Default Number: 1,000.00
Number Format: select #,##0.00 from the drop-down list
10. Save the Balance Letter.rtf file. Your template should appear as follows:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
32 Oracle BI Publisher 10g R3: Fundamentals
11. Preview your progress in the format (PDF, HTML, EXCEL, RTF, POWERPOINT) of your choice.
12. Save the changes and close the file.















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 33
Practice 5-2: Using Charts Within BI Publisher
Overview
In this practice, you insert a chart into a sample template.
Assumptions
Use Microsoft Word to update a template.
Sample template location: D:\Program Files\Oracle\BI Publisher\BI Publisher
Desktop\samples\RTF templates\Sales Report\Retail Sales.rtf
Sample data location: D:\Program Files\Oracle\BI Publisher\BI Publisher
Desktop\samples\RTF templates\Sales Report\RetailSales.xml
Task
Insert a Chart into a Template
1. In MS Word, open the file D:\Program Files\Oracle\BI Publisher\BI Publisher
Desktop\samples\RTF templates\Sales Report\Retail Sales.rtf. The file with a
placeholder for the graph looks like this:


2. Select Data > Load XML Data. Then select the XML sample data D:\Program Files\Oracle\BI
Publisher\BI Publisher Desktop\samples\RTF templates\Sales
Report\RetailSales.xml.
Click Open to load the selected data file, and click OK to acknowledge that the data loaded
successfully.
3. Position your cursor below the header. Select Insert > Chart to create a chart. Define the following in the
chart wizard:
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
34 Oracle BI Publisher 10g R3: Fundamentals
Type = Pie Chart
Values = Sales
Aggregation = Sum
Labels =Industry
4. Click Preview to preview the graph, and click OK. The graph should look like this:



Note: You can also select a style to have an appropriate color theme for your graph.

5. Save the file as My Retail Sales.rtf.
6. Preview your progress in the format (PDF, HTML, EXCEL, RTF, POWERPOINT etc) of your choice. The
result should look like to the preceding screenshot.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 35
Practice 5-3: Create an RTF Template by Using the Basic Method
Overview
In this practice, you create an RTF template using the Basic method.
Assumptions
Use Microsoft Word to update a template.
Sample template location: D:\Labs\ BIP_10.1.3.3_Labs\Templates\User Listing\User
Listing Start 2.rtf
Sample data location: D:\Labs\BIP_10.1.3.3_Labs\Templates\User
Listing\FNDSCURX.xml
Tasks
Add Fields to an RTF Template by Using the Basic Method
1. Open Microsoft Word.
2. Open the starting template, D:\Labs\BIP_10.1.3.3_Labs\Templates\User Listing\User
Listing Start 2.rtf.
3. Select Data > Load XML Data to load the sample data in:
D:\Labs\BIP_10.1.3.3_Labs\Templates\User Listing\FNDSCURX.xml.
Click Open to load the selected data file.
Click OK to acknowledge that the data loaded successfully.
4. To complete the template, type the following information:
Replace the <put for-each here> marker with <?for-each:G_RESPS?>.
Replace the <put USER_NAME here> marker with <?USER_NAME?>.
Replace the <put APPLICATION_NAME here> marker with <?APPLICATION_NAME?>.
Replace the <put RESPONSIBILITY_NAME here> marker with <?RESPONSIBILITY_NAME?>.
Replace the <put START_DATE here> marker with <?START_DATE?>.
Replace the <put END_DATE here> marker with <?END_DATE?>.
Replace the <put end for-each here> marker with <?end for-each?>.
5. Save the file as User Listing 2.rtf.
6. Exit Microsoft Word.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
36 Oracle BI Publisher 10g R3: Fundamentals
Practice 5-4: Create an RTF Template by Using the Form Field
Method
Overview
In this practice, you create a template using the Form Field method.
Assumptions
Use Microsoft Word to update a template.
Sample template location: D:\Labs\BIP_10.1.3.3_Labs\Templates\User Listing\User
Listing Start.rtf
Sample data location:: D:\Labs\Templates\BIP_10.1.3.3_Labs\User
Listing\FNDSCURX.xml
Tasks
Add Form Fields to an RTF Template
1. In Microsoft Word, open the starting template, D:\Labs\BIP_10.1.3.3_Labs\Templates\User
Listing\User Listing Start.rtf.
2. Select Data > Load XML Data to load the sample data in
D:\Labs\BIP_10.1.3.3_Labs\Templates\User Listing\FNDSCURX.xml.
Click Open to load the selected data file.
Click OK to acknowledge that the data loaded successfully.
3. Select Insert > Field.



Use the information in the Field window to insert user name information into the template:
Select the <INSERT USER NAME HERE> marker.
Select User Name in the Field window.
Click Insert or drag-and-drop User Name into your template.
Click Close.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 37



4. Select the <INSERT TABLE OF RESPONSIBILITIES HERE> marker.
Select Insert > Table/Form .
Click <G_RESPS> and drag it from the Data Source pane to the Template pane.
Select Single Node when prompted.
Drag-and-drop the following fields: Application Name, Responsibility Name, Start Date and
End Date.



Click OK to insert the data table.

5. Save the file as User Listing.rtf.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
38 Oracle BI Publisher 10g R3: Fundamentals
6. Preview your report in Microsoft Word by selecting Preview > PDF (or the output format of your choice).
Your report should look like the following:

7. Exit Microsoft Word.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 39
Practice 5-5: Create and Publish an RTF Template for BI Publisher
Reports
Overview
In this practice, you connect to BI Publisher Enterprise and create an RTF template for the employee salary
report that you created in Practice 4, and then you publish the template to BI Publisher Enterprise.
Assumptions
You have completed all of the practices in lesson 4.
Tasks
Connect to BI Publisher and Identify the Report for the Template
1. In MS Word, create a new document. Then, select Oracle BI Publisher > Log On.

2. In the BI Publisher Login window, enter Administrator/Administrator for the username and
password. In the Report Server box, enter the connect string in the following format (This needs to be
entered when you log in to BI Publisher for the first time):
http://<hostname>:<port>/<bipubservername>
Hint: Use the same host name, port number, and BI Publisher server name that you used to log in to
BI Publisher Enterprise in Practice 4-1. (Check with your instructor for any clarification.)
3. Click Login.
Result: The Open Template window appears.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
40 Oracle BI Publisher 10g R3: Fundamentals
4. In the navigation pane, drill down on My Folders, and select Learn (this is the folder you created in a
previous practice).
Result: The report that you created in a previous practice appears.
5. Select the Based on OracleDB report.
Result: The Open Report button is enabled.

6. Click Open Report.
Result: BI Publisher loads the data elements of the selected report in BI Publisher Desktop and your
MS Word document is automatically prepared for report template development. In addition, the report
name is associated with the document in the MS Word title bar, as shown here.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 41
Create the RTF Template
7. On the Template Builder toolbar, select Insert > Table Wizard.
(Hint: The Template Builder toolbar can be dragged from the MS Word toolbar, as shown.)

8. In the opening step of the Table Wizard, select Table as the report format, and click Next.

9. In Step 2 of the wizard, accept ROWSET/ROW as the Grouping Field value, and click Next.
10. In Step 3 of the wizard, select all of the available items (Department Name, Employee Name, Hire
Date, Salary) by clicking the Select All button (>>). Then, click Next.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
42 Oracle BI Publisher 10g R3: Fundamentals
11. In Step 4 of the wizard, select Department Name in the Group By box. Then, click Finish.

Note: If you had selected Next in Step 4, the next two steps of the wizard would enable you to specify
sort order and customized labels for the table.
Result: The following simple BI Publisher report template is inserted into the MS Word document.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 43
Preview the BI Publisher Report
12. On the Template Builder toolbar, select Preview > PDF. (You could select any of the other options.)

Note: In order to preview the report in MS Word, BI Publisher Desktop requires that you first save the
template locally in RTF format. Therefore, the following window appears.

13. Click OK to open the Save As window.
14. In the Save As window, select D:\labs as the location, enter EmpSalRep_Simple.rtf as the name
for the file, and then click OK.
Note: If an Adobe License Agreement window appears, click Accept.
Result: The BI Publisher report appears in PDF format.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
44 Oracle BI Publisher 10g R3: Fundamentals
You can scroll through the report by using the normal features of your PDF application.

15. Close the PDF preview.
Add a Chart to the Template
16. Place your cursor at the end of the template document and add two blank lines.
17. From the Template Builder toolbar, select Insert > Chart. In the Chart window, perform the following:
a. Drag Salary from the Data box to the Values box. A representation of the chart appears in the
preview box.
b. Drag Department Name from the Data box to the Labels box.
Note: The Preview button and Series box are enabled when a value is placed in the Labels box.
c. Select Pie Chart from the Type box.
d. Click the Preview button in the upper-right corner of the Chart window.
The Chart window should look like this:


Note: You can also change the graph style to modify the chart. In addition, you can modify the
appearance of the graph by changing the 3D and Gradient options.
18. Click OK to insert the chart.
The template should now include the chart, like this:
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
Oracle BI Publisher 10g R3: Fundamentals 45


19. Resize or center the chart as desired.
20. Save the template.
21. Preview the template in PDF format. Scroll down to view the entire chart.
22. Close the PDF preview.
Upload the Template to BI Publisher Enterprise
23. From the MS Word menu bar, select Oracle BI Publisher > Upload Template As.

24. In the "Upload as new" window, enter Emp Sal Template 1 as the name and click OK.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 5: Creating Simple RTF Templates
46 Oracle BI Publisher 10g R3: Fundamentals


25. After the template has been successfully uploaded, a confirmation message appears. Click OK.


Note: In Oracle BI Publisher Enterprise, you can view this report using the uploaded template, in any of
the formats such as PDF, RTF, HTML, and PowerPoint. The report looks the same as the preview.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 47
Practice 6: Advanced RTF Template Techniques
Goal
To create and modify RTF templates using the MS Wordsupported features and other
advanced features
Scenario
You use and modify the report templates created in earlier practices. You also create new,
more advanced templates.
Outcome
You will view the report results using these templates.
Time
2 hours + 1 hour (Additional Challenge Practices)
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
48 Oracle BI Publisher 10g R3: Fundamentals
Practice 6-1: Use MS Word Features to Modify a Template

Overview
You modify the EmpSalRep_Simple.Rtf file that you created and published for the BI Publisher report
Based on OracleDB. You explore the MS Wordsupported features for modifying the template. And, you
upload modified versions of the template and then view the report using different templates in BI Publisher
Enterprise.
Assumptions
You have completed all practices for lessons 4 and 5.
You are able to save your template files in the D:\Labs\BIP_10.1.3.3_Labs\Templates
folder on your system.
Tasks

Modify the EmpSalRep_Simple Template
1. Open the EmpSalRep_Simple.rtf file in Microsoft Word. (You have created this template and
published it for the Based on OracleDB report in practice 5-6.)
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 49




2. Make the following formatting changes to the table:
a. Change the fonts for the Department Name, Employee Name, and Hire Date fields to Arial.
b. Select 12 as the font size for the Department Name field, and 10 as the font size for other fields.
c. Change the text color for the Department Name field to dark blue.
d. Right-justify both the SALARY field and the Salary heading. (Use the align right icon on the MS
Word toolbar.).
The table in the template should now look like this:


3. Make the following modifications to field properties:
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
50 Oracle BI Publisher 10g R3: Fundamentals
a. Double-click the HIRE_DATE field; this opens the BI Publisher Properties dialog box.

b. Click Word Properties.
Result: The Text Form Field Options dialog box appears.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 51
c. Select Date from the Type drop-down list, and select MM/dd/yyyy from the Date format drop-down list. Click
OK.

d. Double-click the SALARY field, and then click Word Properties to open the Text Form Field Options
dialog box. Select Number from the Type drop-down list, Enter 99,999,999.99 in the Default Number
field. Select the Number format that begins with a $ symbol, as shown. Click OK.



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
52 Oracle BI Publisher 10g R3: Fundamentals
4. Add Employee Salary Report as the title to the template. Select the text color and font that you desire.
Now the template file should look something like this:

5. Save the file as EmpSalRep_Modified.rtf. Leave MS Word and the template file open.
Publish a New Template for the BI Publisher Report
In order to publish a new template, you must associate it with an existing BI Publisher report. To publish the
EmpSalRep_Modified.rtf template that you just modified and saved in the previous practice, perform the
following steps:
6. If not already logged in, log in to BI Publisher from MS Word as Administrator. (Reminder: Select Oracle
BI Publisher > Log On from the MS Word menu bar). The Open Template dialog box appears.
If you are already logged in, select BI Publisher> Open.
7. In the Open Template dialog box, select the Based on OracleDB report from My Folders > Learn. Then,
click Open Report :

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 53


Result: The template is associated with the BI Publisher report, as shown in the MS Word title bar:

8. Select the Oracle BI Publisher > Upload Template As option.
9. In the Upload As New window, enter Sal Rep Template 2 as the name and click OK. Click OK again in
the confirmation window.
Modify the Chart and Publish a New Template for the BI Publisher Report
10. Right-click the chart in the template and select BI Publisher Chart to edit the chart.
a. Select Average as the aggregation option for Salary.
b. Select Regatta as the style.
c. Enter Average Employee Salaries by Department as the title.
d. Click Preview.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
54 Oracle BI Publisher 10g R3: Fundamentals

e. Click OK.
11. Save the file as EmpSalRep_Mod2.rtf.
12. Select Oracle BI Publisher > Upload Template As.
13. In the Upload As New window, enter Sal Report Template 3 as the name and click OK. Click OK again
in the confirmation window.
Add Conditional Formats to the Report Template

The current version of BI Publisher Desktop provides wizards to use additional features such as conditional
formats and conditional regions.
14. To insert a conditional format on the Salary field, select the Salary field (not the Header), and select
Insert > Conditional Format.


15. This displays the BI Publisher Properties dialog box for defining the conditional format. In this dialog box
define the following:
a. In the General section, select Salary from the Data Field drop-down list, select Number as the
type, and select Apply to Entire Table Row (to apply the format to the entire row).
b. In the Condition 1 section, select Greater Than or Equal to from the list of conditions in the
Data field drop-down list, and type 8000 as the value in the adjacent box. Click Format.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 55


c. In the Format dialog box, specify light yellow as the Background Color, and dark green as the
Font Color. Also, select Bold as the Font Style. Click OK.


d. This takes you back to the BI Publisher Properties dialog box. Click OK again to complete
defining the conditional format.
e. Save the template file, and then select Preview > PDF to see the data. The report with this
conditional format added looks like this:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
56 Oracle BI Publisher 10g R3: Fundamentals


f. If you have time, perform the following: In the same conditional format, in the Condition 2
section, select Less than as the condition, and type 3500 as the value in the adjacent box. Click
Format to define the format. Specify light yellow as the Background Color, and red as the Font
Color. Also, select Bold as the Font Style.



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 57



Note: MS Word has a limitation of 393 characters for the conditional format code generated, click the
Advanced tab in the BI Publisher Properties dialog box, to see the piece of code added for the conditional
format

Add a Calculation Field with a Descriptive Sentence

You can add a summary calculation such as sum, average of a field, and embed it in a descriptive sentence.
For example at the end of employee details of each department, we can have the sentence, The average
employee salary of <department name> is: <average salary>.
16. Type in the sentence The Average Employee Salary for <Department_Name> is: <Average Salary>
just below the table and before the end row by Department_Name tag. Right-justify this sentence, and
change the font color to dark blue (or as appropriate). (See the following screenshot.)


17. In the above sentence, select the <Department_Name> placeholder and select Insert > Field. In the
Field dialog box, select the Department Name field and click Insert to insert this field. Click Close.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
58 Oracle BI Publisher 10g R3: Fundamentals


18. Similarly, select the <Average Salary> placeholder and select Insert > Field. In the Field dialog box,
select the Salary field, select Average from the Calculation drop-down list, select the On Grouping
check box, and click Insert. Click Close.
19. Select appropriate font colors for these inserted fields and also select the same number format for the
Average Salary field, as you have selected for the Salary field.




















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 59
20. Preview the data as PDF.
21. Save the template file, and select Oracle BI Publisher > Upload Template As.
22. Enter Sal Report Template 4 as the name of the template, and click OK.
Click OK again, when the confirmation message is displayed.
View the Report Data in BI Publisher by Using Different Templates
23. Now log in to Oracle BI Publisher Enterprise as Administrator, and navigate to My Folders > Learn.
24. Click the View link below the Based on OracleDB report.
Result: By default, the report appears using the first template in HTML format.

25. You can see all the available templates that you have published for this report by selecting the Template
drop-down list.

26. Select the second template for the report. You can also choose a different view for the data. For example,
select PDF, and then, click View.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
60 Oracle BI Publisher 10g R3: Fundamentals


Scroll down to the bottom of the report to view the entire chart.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 61
27. Select the third template for the report and choose PDF as the view format. Click View and then scroll
down to see the Average Salary chart.


28. The PDF data in the report using the last template you published looks like this:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
62 Oracle BI Publisher 10g R3: Fundamentals


29. Scroll down to see the graph; note that the graph is the same as the preceding template.























O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 63
Practice 6-2: Create a Base Template
Overview
In this practice, you walk through an increasingly complex RTF example that highlights most of the
capabilities of the RTF templates in BI Publisher. In this practice you start by creating a base template for the
sample XML data.
Assumptions
Use Microsoft Word to create a template.
Sample data location: D:\Program Files\Oracle\BI Publisher \BI Publisher
Desktop\samples\RTF templates\Invoices\InvoiceListing.xml
Tasks
Open Create the Template in Microsoft Word
1. Open Microsoft Word.
2. Select File > Page Setup > Margins.
Change the page orientation from Portrait to Landscape.
Click OK.


3. Create a title on the first line of the template, using the following information:
Title: Invoice Listing
Font: Arial, 16 pt, Bold
Centered
4. Add a table to the third line of the template.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
64 Oracle BI Publisher 10g R3: Fundamentals
With your cursor at the left margin, select Table > Insert > Table to insert a table of six columns and
two rows with fixed-width columns.
Set the header row text to black, bold, with a gray background.
To change background:
Select the header row.
Select Format > Borders and Shading > Shading.
Select a gray color from fill grid.
Create the following headings for each column:
Invoice Num Invoice Date Curr GL Date Entered Amt Accounted Amt

Center the table headings.
Verify that the cursor is in the first row (for example, the header row), and select Table > Heading
Rows Repeat.
Note: To see this, preview in PDF.
5. Save the beginning template as Baseline.rtf. Be sure to save the template as an RTF template and not
as a Microsoft Word file.
Note: A solution file is available in:
D:\Labs\BIP_10.1.3.3_Labs\Templates\SolutionBaseline.rtf.
The table in the file looks like this:

Load the XML Sample Data
6. Select Data > Load XML Data to load the sample data in D:\Program Files\Oracle\BI
Publisher \BI Publisher Desktop\samples\RTF
templates\Invoices\InvoiceListing.xml.
Click Open to load the selected data file.
Click OK to acknowledge that the data loaded successfully.
7. Insert the following fields into their columns in the table using the Form Field dialog box (Insert > Field):

Column # Table Field
1 INVOICE_NUM
2 INVOICE_DATE
3 INVOICE_CURRENCY_CODE
4 GL_DATE
5 ENT_AMT
6 ACCTD_AMT
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 65
Close the Form Field window.
8. Set the properties for the INVOICE_CURRENCY_CODE field:
Type: Regular Text
Default text: USD
Maximum length: 5 (to set maximum length to five characters)
9. Set the properties for the ENT_AMT and ACCTD_AMT fields:
Hint: Place the cursor over the field, and then select Properties.
Set Type to Number values with comma separators (,) and decimal points (.), with a maximum
of six characters to the left of the decimal point and two to the right of the decimal point (that is,
#,##0.00).
Click OK to close the Text Form Field Options window.
Right-justify both data columns.
10. Add a <?for-each:G_INVOICE_NUM?> before the INVOICE_NUM field in the same cell.
11. Add a <?end for-each?> after the ACCTD_AMT field in the same cell.
12. Preview the report to make certain it is correct. Your review output should look similar to the following:

13. Save the template at this stage as Revision1.rtf in the Labs folder.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
66 Oracle BI Publisher 10g R3: Fundamentals
Practice 6-3: Modify the Template and Combine Data
Overview
You modify the template that you created earlier to combine the data.
Tasks
Combine the Suppliers with Their Invoices
1. Open D:\Labs\BIP_10.1.3.3_Labs\Templates\Revision1.rtf in Word.
2. Between the Invoice Listing header and the data table, add another table. It will not have a header row
since it will not be tabular data.
Select Table > Insert Table to insert a table with two columns and two rows.
Enter the following values:
Location Label
Row 1, Column 1 Supplier:
Row 1, Column 2 VENDOR_NAME (an XML data item)
Row 2, Column 1 Address:
Row 2, Column 2 ADDRESS (an XML data item)
Hint: XML data items are added using Insert > Field.
Use font color and cell shading/color as desired.
3. Before the first table (that is, the new table), add the following markup: <?for-
each:G_VENDOR_NAME?>
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 67
4. After the data table (that is, the old table), add the following markup: <?end for-each?>. Your
template should look similar to the following:

5. Save the report as Revision2.rtf. The results should look similar to the following:


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
68 Oracle BI Publisher 10g R3: Fundamentals
Practice 6-4: Modify the TemplateAdd a Total
Overview
You modify and add a total to the template that you created in the previous practice.
Tasks
Add a Supplier Invoice Total
1. Open D:\Labs\BIP_10.1.3.3_Labs\Templates\Revision2.rtf in Word.
2. Insert a three-column, one-row table directly beneath the data table. It is not tabular data; therefore,
there is no header row.
Column 1 should be labeled Total for Supplier:
Columns 2 and 3 are blank.
After the label in Column 1, add a field link to VENDOR_NAME.
3. Insert ENT_SUM_VENDOR into Column 2. Ensure that the output is right-aligned and has the same
numeric format (#,##0.00) as the table data.
4. Insert ACCTD_SUM_VENDOR into Column 3. Ensure that the output is right-aligned and has the same
numeric format (#,##0.00) as the table data.
Note: To obtain the sum of the Entered Amount and Accounted Amount fields, we have two choices:
In the case of our XML data, we already have XML fields for the sums. Those fields are
ENT_SUM_VENDOR and ACCTD_SUM_ VENDOR.
If you did not have those fields in your XML, you would use an XSL function to calculate the sum
<?sum(ENT_AMT)?> and <?sum(ACCTD_AMT)?>. Although the XSL function works, it places the
workload on the middle tier. It will not perform as well as it does when you move the workload to the
database tier. When possible, use database tier fields for improved performance and scalability.
For this task, you use the XML data. Why? Not only is XSL not performance friendly, but it is also
much more difficult to format properly.
5. Save the report as Revision3.rtf. Your output should look similar to the following example.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 69

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
70 Oracle BI Publisher 10g R3: Fundamentals
Practice 6-5: Modify the TemplateSummarize and Total
Overview
In this practice, you modify the template to summarize the total added in the previous practice.
Tasks
Summarize the Taxes and Grand Total
1. Open D:\Labs\ BIP_10.1.3.3_Labs\Templates\Revision3.rtf in Word.
2. Type Invoice Tax Summary directly beneath the <?end for-each?> that ends the Vendor data. (That
is, add a Heading at the bottom of the template.)
3. Insert a three-column, three-row table directly beneath the Invoice Tax Summary heading. The table
does not contain tabular data; therefore a header row is not needed. Use the information in the following
table to fill in the table:
Location Label Formatting
Row 1, Column 1 Tax Code
Row 1, Column 2 and 3 leave blank
Row 2, Column 1 <?for-each:G_SUMM?>
<?TAX_CODE?>

Row 2, Column 2 SUM_ENT_AMT

Right-aligned, numeric
formatted as #,##0.00.
Row 2, Column 3 SUM_ACCTD_AMT
<?end for-each?>
Right-aligned, numeric
formatted as #,##0.00.
Row 3, Column 1 Report Total
Row 3, Column 2 ENT_SUM_REP Right-aligned, numeric
formatted as #,##0.00.
Row 3, Column 3 ACCTD_SUM_REP Right-aligned, numeric
formatted as #,##0.00.
4. Save the report as Revision4.rtf. Your output should look like this:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 71
Practice 6-6: Modify the TemplateAdd Headers and Footers
Overview
You modify the template to add headers and footers.
Tasks
Add Headers and Footers
1. Open D:\Labs\BIP_10.1.3.3_Labs\Templates\Revision4.rtf in Word.
2. Obtain the Oracle logo image by opening one of the Invoice RTF files in the sample directory. Versions
5, 6, and 7 contain the image.
3. Open InvoiceListing5.rtf file from D:\Program Files\Oracle\BI Publisher\BI
Publisher Desktop\samples\RTF templates\Invoices. View the headers and footers of that
report. Select the header, copy it, and paste it into your reports header. Do the same with the footer.
4. Save the report as Revision5.rtf in D:\Labs\BIP_10.1.3.3_Labs\Templates. Your output
should look like this:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
72 Oracle BI Publisher 10g R3: Fundamentals
Practice 6-7: Additional Challenge 1
Overview
These practices have been designed to offer you an additional challenge. Use Revision5.rtf.
Tasks
Challenge
1. You can use Table > Table AutoFormat and then select one of the predefined table formats available in
MS Word. Save the report as Revision1Challenge1.rtf.
2. Sort the invoice numbers in ascending order. Save the report as Revision1Challenge2.rtf.
Note: Some of the solutions for this task are made available for you in Solution1.rtf,
Solution1Challenge1.rtf and Solution1Challenge2.rtf in
D:\Labs\BIP_10.1.3.3_Labs\Templates folder.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 73
Practice 6-8: Additional Challenge 2Create a Report Template
and Use Form Field Tools
Overview
In this practice, you use Word to create a Salary Report and use the form field tools to format the report.
Tasks
Create the Employee Salary Report
1. Open a new file in Word.
Select File > Page Setup > Margin.
Change Orientation to Landscape.
Click OK.
Press Enter twice (there should be three rows in your template).
2. In the first line, create the title Employee Salary Report.
Change the formatting (for example, Centered, Arial 16pt, Bold).
3. Select Load XML Data to load the XML data to your template.
Select D:\OracleBI\xmlp\XMLP\DemoFiles\Employee Salary Report.xml.
Click OK to acknowledge that the data loaded successfully.
4. Place your cursor in the third row.
5. Select Insert > Table/Form
Drag the Row node to the Template pane.
Select Drop Single Node.
Drag the following data items in the following order to the Template pane.
Name
Job Title
Manager
Department Name
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
74 Oracle BI Publisher 10g R3: Fundamentals
Salary


Click OK to return to your template.
6. Select Preview > and select your format to preview (PDF, HTML, Excel, RTF, PowerPoint).
7. Save your template.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 75
Insert Additional Form Fields into the Template
8. Verify that Word is displaying the Forms toolbar. (View > Toolbars > Forms.)



9. In the first column, second row of the table, place your cursor between the for-each ROW field and the
Name field.
10. Insert a text form field, by clicking .
Double-click the text form field.
Set the default text to if odd:
Select Add Help Text > Status Bar.
Enter <?if:position() mod2=1?>.
Click OK to close the Form Field Help Text dialog box.
Click OK to close the Form Field Options.
11. In the last column, second row of the table, place your cursor between the Salary field and the end ROW
field.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
76 Oracle BI Publisher 10g R3: Fundamentals
12. Insert a text form field, by clicking .
Double-click the text form field.
Set the default text to end odd:
Select Add Help Text > Status Bar:
Enter <?end if?>.
Click OK twice to return to your template.
13. Create a new row below row 2 and duplicate the content from row 2 into row 3.
Add shading to row 3.
Hint: Select row 3, and then right-click and select Borders and Shading > Shading.
14. Double-click the if-odd: text in column 1, row 3.
Change the default text to if even:
Select Add Help Text > Status Bar.
Change 1 in the code to 0, so that the code looks like this: <?if:position() mod2=0?>.
Click OK twice.
15. In the last column, row 3, double-click the Text Form field end odd:
Set the default text to end even:
Click OK. The template should look like this:

16. Select Preview > and select your format to preview (PDF, HTML, Excel, RTF).
17. Scroll through the document and notice that the content is displayed twice, first without shading and then
again with shading. Because each row has its own for-each loop, you see the data twice.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 77

...

18. To fix the duplicate record and grouping issue, perform the following steps:
Delete the end ROW field at the end of row 2.
Delete the for-each ROW at the beginning of row 3.
19. Select Preview > and select your format to preview (PDF, HTML, Excel, RTF).

20. Save your template.
Add a Total Column
21. Add another row to the table (row 4).
In the fourth column of row 4, type: Total
In the last column of row 4, insert a field by doing the following:
Select Insert > Field.
Select Salary.
Select sum from the calculation drop-down list.
Click Insert.
Click Close.
22. Change the shading for your Total row.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
78 Oracle BI Publisher 10g R3: Fundamentals
23. Save your template.
Include Balance Information
24. Insert two lines above the Employee Salary Report title.
25. Insert a Table with two columns and one row in line 1.
Hint: Table > Insert > Table
26. In the first column, include the text Balance Forward:
27. Insert a text form field in the second column by clicking .
Double-click the text form field.
Select Add Help Text > Status Bar.
Enter <xdofo:show-brought-forward name="pt" format='99G999G999D00'/>.
Note: You can add markup to create the mapping between your layout and the XML file and to
include features that cannot be represented directly in your format.
Click OK, and then click OK again.
28. Place your cursor on line 2 (that is, between the Balance Forward table and the Employee Salary
Report).
Insert a text form field. ( )
Double-click the form field.
Enter End Header: Start Body as the default text.
Select Add Help Text > Status Bar.
Enter <?Start:body?>.
Click OK, and then click OK again.
29. Enable the page totaling of the Salary rows. In rows 2 and 3 of the Employee Salary table for the Salary
Column, insert a text form field. ( )
Double-click the form field.
Enter PT as the default text.
Select Add Help Text > Status Bar.
Enter <?add-page-total:pt;SALARY?>.
Click OK, and then click OK again.
30. Following the Employee Salary table, insert a text form field: ( )
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 79
Double-click the form field.
Enter default text: End Body: Start Footer
Select Add Help Text > Status Bar.
Enter <?end body?>.
Click OK, and then click OK again.
31. Insert a Word table with two columns and two rows following the End Body: Start Footer text form field.
32. In column 1, row 1, add text: Total Salary per Page:
33. In column 2, row 1, insert a text form field: ( )
Double-click the form field.
Select Add Help Text > Status Bar.
Enter <?show-page-total:pt;'99G999G999D00'?>.
Click OK, and then click OK again.
34. In column 1, row 2, add text: Carry Forward:
35. In column 2, row 2, insert a text form field: ( )
Double-click the form field.
Select Add Help Text > Status Bar.
Enter <xdofo:show-carry-forward name="pt" format='99G999G999D00/>.
Click OK, and then click OK again. Save the template. The template should look like this:

36. Select Preview >, and then select your format to preview (PDF, HTML, Excel, RTF).
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
80 Oracle BI Publisher 10g R3: Fundamentals
Practice 6-9: Additional Challenge 3Create a Crosstab Report and
RTF Template


Overview
This practice will give you an additional challenge: to create a crosstab report using an increasingly
complicated query to display the order information of the customers by their sales representatives and sales
managers. This kind of information is very important to sales managers and sales VPs, who want to see how
each sales representative, and also each sales manager and his team of sales representatives, generate
business. You will also create a simple crosstab template using BI Publisher Desktop.
Assumptions
Use Microsoft Word to create a template.
Complete all the previous practices.
Tasks
Create a Crosstab Report in BI Publisher Enterprise

You have already created reports in BI Publisher Enterprise, so the steps are briefly listed here:
1. Log in to BI Publisher Enterprise as Administrator.
2. In the Learn folder, create a report and name it as Order_Info.
3. In the Edit mode of the report, create a new data model for the report, select Demo as the data
source, select the Cache Results check box, and define the following query:

select ORDERS.ORDER_ID as ORDER_ID, ORDERS.ORDER_MODE as ORDER_MODE,
ORDERS.ORDER_STATUS as ORDER_STATUS, TO_CHAR(ORDERS.ORDER_DATE, 'DD-MON-
YY') as ORDER_DATE, ORDERS.ORDER_TOTAL AS ORDER_TOTAL,
CUSTOMERS.CUST_FIRST_NAME as CUSTOMER_NAME, EMPLOYEES_1.FIRST_NAME as
SALES_REP_NAME, EMPLOYEES_2.FIRST_NAME as SALES_MGR_NAME
from OE.EMPLOYEES EMPLOYEES_2, OE.EMPLOYEES EMPLOYEES_1, OE.EMPLOYEES
EMPLOYEES, OE.CUSTOMERS CUSTOMERS, OE.ORDERS ORDERS
where CUSTOMERS.CUSTOMER_ID=ORDERS.CUSTOMER_ID
and ORDERS.SALES_REP_ID=EMPLOYEES_1.EMPLOYEE_ID
and EMPLOYEES_1.MANAGER_ID=EMPLOYEES_2.EMPLOYEE_ID
and EMPLOYEES.EMPLOYEE_ID =CUSTOMERS.ACCOUNT_MGR_ID(+)
Hint: This query is provided in the Prac6-9-3_CrosstabQuery.txt file in D:\Labs folder so that you
can copy and paste the query from the file.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 81
If you want more challenge, see the following screenshots to help you with Query Builder query creation:

Add the ORDERS, CUSTOMERS, and EMPLOYEES tables in Query Builder.
(Note: The EMPLOYEES table should be added three times, and every time it is added with a different
alias in the screen you can see these are added as EMPLOYEES, EMPLOYEES_1, EMPLOYEES_2.)

Now define joins between the tables, so the joins are defined between the columns (you have already created
joins in the previous practices) as follows:
CUSTOMERS.CUSTOMER_ID=ORDERS.CUSTOMER_ID
ORDERS.SALES_REP_ID=EMPLOYEES_1.EMPLOYEE_ID
EMPLOYEES_1.MANAGER_ID=EMPLOYEES_2.EMPLOYEE_ID
EMPLOYEES.EMPLOYEE_ID =CUSTOMERS.ACCOUNT_MGR_ID(+) (This last join should
be defined as an outer join on right. To create this join, create a normal join between the two
columns, right-click the corresponding join line created, and select Set Right Outer Join.)
See the following screenshot:
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
82 Oracle BI Publisher 10g R3: Fundamentals




























O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 83
Now you can select the columns as shown in the screenshot:
ORDER_ID, ORDER_DATE (later, this column has to be formatted properly using the
TO_CHAR function as shown in the query), ORDER_TOTAL, ORDER_MODE from
ORDERS
CUST_FIRST_NAME from CUSTOMERS
FIRST_NAME from EMPLOYEES_1 (you have to later provide an alias name of
SALES_REP_NAME for this column)
FIRST_NAME from EMPLOYEES_2 (This has the alias of SALES_MGR_NAME in the
query)



You can also change the order of the columns, in the Conditions tab. When you are done, click
Results to see the results in Query Builder and save the query. Once the base query is built like
this, you can edit the query manually to reflect the query as given above in Step 3.


























O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
84 Oracle BI Publisher 10g R3: Fundamentals

After defining and editing the query, the screen looks like this:


4. Save the report, and view the XML data (A portion of the data is displayed here):


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 85
Create a Simple Crosstab RTF Template in BI Publisher Desktop
5. Now open Word, and create a new document.
6. Log in to BI Publisher as Administrator in Word.
7. Open the report Oder_Info from My Folders> Learn.
8. Now select Insert> Crosstab.


9. This displays the Cross Tab dialog box. Drag and drop the fields, so that the layout looks like the
following screenshot, and click Preview.






















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
86 Oracle BI Publisher 10g R3: Fundamentals
10. Examine the preview, which looks like the following screenshot, and click OK.


11. Save the template file as Order_Info_Simple.rtf, and select Preview > PDF to view the data.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
Oracle BI Publisher 10g R3: Fundamentals 87


Scroll down to see the data for other sales managers.
12. Upload this template to BI Publisher Enterprise as Order_Info_Simple_Template.
Note: If you have time, use the features discussed in previous practices to format the column headers,
format the fields as appropriate, add titles, change font colors and styles, and so on.























O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 6: Advanced RTF Template Techniques
88 Oracle BI Publisher 10g R3: Fundamentals

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
Oracle BI Publisher 10g R3: Fundamentals 89
Practice 7: Creating BI Publisher Reports with
Parameters, Lists of Values, and Hyperlinks
Goal
To create BI Publisher reports with parameters, list of values (LOVs), and hyperlinks
Scenario
You use the reports created in earlier practices, create some new reports, and edit the
report results.
Outcome
You will view the report results.
Time
3040 minutes
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
90 Oracle BI Publisher 10g R3: Fundamentals
Practice 7-1: Adding a Parameter and a List of Values to a Report
Overview
In this practice, you modify the employee salary report that you have created in Practice 3 by adding a
parameter to it. You will also create a List of Values object and associate it with this parameter.
Assumptions
You have completed the previous practices for lessons 4, 5, and 6.
Tasks
Create a Copy of the Employee Salary Report
1. Log in to BI Publisher as Administrator (If not already logged in), and navigate to My Folders> Learn.
2. Click the Report Actions icon to the left of the Based on OracleDB report link.


Result: Additional report actions appear in the Folder and Report Tasks section, as in the following
screenshot.


3. Click Copy this report, and then click Paste from clipboard to paste it into the same folder. (A
confirmation dialog is displayed click OK.)
4. Click the Report Actions icon that is next to the copied report.
5. Click Rename this report and name the copied report Report with Parameters and LOVs.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
Oracle BI Publisher 10g R3: Fundamentals 91
Add a Parameter to the Report
6. Click the Edit link to open the renamed report in Edit mode.
7. Click the Parameters node in the Report pane. Then click New to create a parameter.

8. In the Parameter screen, define the following:
a. Enter dname as the identifier.
b. Select String as the data type.
c. Enter Sales in the Default Value field.
d. Select Text as the parameter type.
e. Type in Enter Department Name as the display label.

f. Click Save to save the parameter.























O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
92 Oracle BI Publisher 10g R3: Fundamentals
Modify the Query to Include the Parameter

9. Click New Data Set 1 to open the report in Edit mode. (Ensure that demo is selected as the data source.)
10. Edit the SQL query to add the parameter dname so that the query looks like this:

select DEPARTMENTS.DEPARTMENT_NAME as DEPARTMENT_NAME,
EMPLOYEES.FIRST_NAME ||' '||EMPLOYEES.LAST_NAME as EMPLOYEE_NAME,
EMPLOYEES.HIRE_DATE as HIRE_DATE,
EMPLOYEES.SALARY as SALARY
from HR.DEPARTMENTS DEPARTMENTS,
HR.EMPLOYEES EMPLOYEES
where DEPARTMENTS.DEPARTMENT_ID=EMPLOYEES.DEPARTMENT_ID
and DEPARTMENTS.DEPARTMENT_NAME =:dname

11. Click Save to save the changes made to the query

12. Click View to view the report data in PDF format using one of the templates you have published earlier.
Note that the report data is displayed with the default parameter value; that is, for the Sales department.



Note: You can enter the names of other departments to see the data. For example, in the parameter field
enter Shipping as the department name, and click View again to see the data for the Shipping department.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
Oracle BI Publisher 10g R3: Fundamentals 93
Add a List of Values to the Report and Associate with the Parameter
13. Click Edit to edit the report.
14. In the Report pane, click List of Values, and click New.
15. In the List of Values screen, select demo as the Data Source, and click Query Builder to define a
query for defining a list of values.



16. In Query Builder, select DEPARTMENTS from the HR schema. Then select the DEPARTMENT_NAME column and
save the query.



17. Click Save to save the changes to the report.
18. Associate the dname parameter with the List of Values object. Click dname under the Parameters node.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
94 Oracle BI Publisher 10g R3: Fundamentals
19. In the Parameter screen, select or enter the following:
a. Parameter Type: Menu (Result: The Menu Setting section appears.)
b. Display Label: Select Department Name:
c. List of Values: New List of Values 1 (the LOV that you created)
d. Options: Can select all (NULL Value Passed)



20. Click Save to save the changes to the report.
21. View the report data, and notice that the parameter is now displayed as a list of values, from which you
can select a department name to view the data.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
Oracle BI Publisher 10g R3: Fundamentals 95

22. Choose a different department, and click View.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
96 Oracle BI Publisher 10g R3: Fundamentals
Practice 7-2: Creating a Report with Hyperlinks
Overview
In this practice, you create a master report with department details, and define a hyperlink in the template to
the report with the employee details. You drill down on the hyperlink to view the detail data generated in the
report.
Tasks

Creating a Master Report (with Department Details)
1. Log in to BI Publisher as Administrator, and navigate to My Folders > Learn.
Click Create a New Report. Enter Linked Report as the name of the report, and click Create. The report
is displayed in the Learn folder in BI Publisher.



2. Open the report in Edit mode. (Click the Edit link under the name of the report.) In Report Properties,
select demo from the Default Data Source drop-down list.
Click the Save icon (found at the top-left corner) to save the changes.

3. Create a new data model, ensure that SQL Query is selected as Type, and demo is selected as Data
Source.
Select the Cache Results check box, and click Query Builder to define the query. The Query Builder
screen appears. Ensure that HR is selected from the Schema drop-down list. Perform the following:
a. Select the DEPARTMENTS, LOCATIONS, and COUNTRIES tables to add them to the
Model canvas on the right.
b. Define joins between these tables as follows:
Click the box beside the LOCATION_ID column in the DEPARTMENTS table.
Similarly, click the box beside the LOCATION_ID column in the LOCATIONS table.
Note that a fine line joining the tables appears in the Model canvas.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
Oracle BI Publisher 10g R3: Fundamentals 97
Similarly, define another join between the LOCATIONS and COUNTRIES tables by using the
COUNTRY_ID columns.
c. Select the following columns from the tables (by selecting the check boxes beside the column
names):
-Select DEPARTMENT_ID and DEPARTMENT_NAME from the DEPARTMENTS table.
-Select CITY from the LOCATIONS table.
-Select COUNTRY_NAME from the COUNTRIES table.
Click Save to save the query.


Note: Do select the DEPARTMENT_ID column even if you do not want to display it in your
report.

Modify the Detail Report:
4. Copy the Based on Oracle DB report that you have created earlier, and rename it as Employee Details.
Click Edit to open this report in edit mode.
5. Create a parameter named dept_id, and edit the query for this report to include this parameter. (The
steps have been described in detail in practice 7-1) See the following screenshots to get the idea:



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
98 Oracle BI Publisher 10g R3: Fundamentals


6. Do not close BI Publisher or this report. Click View and copy the URL that appears in the browser window
for this report.
Add a Hyperlink in the Template File for the Master Report
Note: Some of the practices use predefined templates to act as starting points. You can also create your own
templates in BI Publisher Desktop in a way similar to what you have done in practices 4 and 5.
7. Open Word, and open the template file LinkedReport.rtf (provided with the course) from the location:
E:\Labs\Templates.
8. Observe that the template contains a simple table with Department Name, City, and Country Name
columns:


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
Oracle BI Publisher 10g R3: Fundamentals 99

9. In Word, log in to BI Publisher as Administrator, and open the Linked Report (with Department Details,
which you created in practice 7-1). In the Open Template window, ensure that BI Publisher is selected
as the workspace, and then open Linked Report (which you created by navigating to the My Shared
Folders > Learn folder).


After loading the report (XML) data, select Preview > PDF to view the report in PDF format:



Note: Do not close the template file or Word.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
100 Oracle BI Publisher 10g R3: Fundamentals
10. In the template file, select the DEPARTMENT_NAME field, and select Insert > Hyperlink.



11. In the Insert Hyperlink dialog box, paste the URL of the Employee Details report that you copied earlier,
and add the following at the end: ?dept_id={DEPARTMENT_ID}.


12. Click OK. Save the file. Preview the template as PDF, and ensure that the links are working.
13. Word has a known limitation on the length of the URL in a hyperlink. If the links are not working properly,
try the following:

Use an XSLT variable to hold a portion on the URL. Insert the following code into your RTF file (this will
not be shown in the report):
<?variable:report_url;string(<URL of the Employee Details report)?>
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
Oracle BI Publisher 10g R3: Fundamentals 101
Edit the hyperlink to use this variable as: {$report_url}?dept_id={DEPARTMENT_ID}


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
102 Oracle BI Publisher 10g R3: Fundamentals
14. Now preview the report as a PDF and check the links.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
Oracle BI Publisher 10g R3: Fundamentals 103
15. If you click the Accounting link, the employee salary report for this department is displayed in BI
Publisher.
Note that the value of Department ID is being passed as the parameter for the report.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 7: Creating Parameters, List of Values (LOVs), and Hyperlinks
104 Oracle BI Publisher 10g R3: Fundamentals

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
Oracle BI Publisher 10g R3: Fundamentals 105
Practice 9: Oracle BI Publisher Server: Administration
Goal
To administer Oracle BI Publisher Enterprise Server and configure settings and delivery
options
Scenario
You perform the administrative tasks to configure the settings and delivery media.
Outcome
This practice is a prerequisite for Practice 10.
Time
3040 minutes
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
106 Oracle BI Publisher 10g R3: Fundamentals
Practice 9-1: Defining the Data Sources

Overview
In this set of exercises you perform administrative tasks to configure various settings and delivery media.

Note: Defining a JDBC data source (creating a connection to Oracle Database) is already covered in Practice
3, so this exercise does not cover it. Also, JNDI data sources are not covered in this course.
Assumptions
You have completed Practice 4 and defined the JDBC connection.
BI Publisher services are up and running, and you have the administrator privileges.

Tasks

Define a File Data Source
1. Log in to BI Publisher Enterprise Server as Administrator.
2. Click the Admin tab. From the Admin page click File in the Data Sources section.





3. This displays the list of existing file data sources. Click the Add Data Source button. Enter the following
fields for the new file data source:
Data Source Name: Enter demo files as the name for the data source. (If this data source name
already exists, enter another appropriate name.)
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
Oracle BI Publisher 10g R3: Fundamentals 107
Path: Enter the full path to the demo file directory on your system:
<Oracle Home>/xmlp/XMLP/demofiles.
Note: In general, you can also define the file data source to any directory on your system that has
your XML and other template files.
Click Apply to save the changes.



Note: You can also view or update the data source definitions.
On the Admin page, select the Data Source type to update. Select the name of the connection to view or
update. All fields are updateable. Click Apply to apply any changes or Cancel to exit the update page.




















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
108 Oracle BI Publisher 10g R3: Fundamentals
Practice 9-2: Defining Users and Roles

Overview
In this practice you create a user and assign roles to that user. You also create a role and assign the required
privileges to the role.

Note: Through the Security Center options on the Admin page, you can create users and roles for
implementing BI Publisher security.

Assumptions
BI Publisher services are up and running, and you have the administrator privileges.
The security model is set up as BI Publisher Security Model (Check with your instructor on this). If
not, perform the following:
In BI Publisher Enterprise, click the Admin tab. Click the Security Configuration link under the
Security Center section. Select BI Publisher Security from the Security Model drop-down list
(found at the bottom of the page). Click Apply to save the changes. (If this step is not performed,
then the User link may not be displayed in the Security Center section).

Tasks
Adding a User

1. In BI Publisher Enterprise, click the Admin tab
2. On the Admin page, click Users in the Security Center section. This invokes the Security Center Users
page. Here you see the list of existing users.
3. Click Create User.
Enter hrmgr as the username and hr as the password for the user.
Click Apply.

Updating a User

4. In the Security Center section, click the Users tab. This invokes the Security Center Users page.
5. Click the user that you want to update; that is, click hrmgr. Enter hrmgr as the password, and click
Apply.



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
Oracle BI Publisher 10g R3: Fundamentals 109
Adding a Role to a User

6. In the Security Center section, click the Users tab. This invokes the Security Center Users page.
7. Click the Assign Roles icon for the hrmgr user. (See the following screenshot.)



8. On the Assign Roles page, select the BI Publisher Online Analyzer, BI Publisher Excel Analyzer, BI
Publisher Developer, and BI Publisher Template Designer roles from the Available Roles list.
(Hint: Use the Ctrl key to select multiple roles)
Then, click the Move icon to move the role to the Assigned Roles list.



9. When done assigning all the required roles, click Apply.

Note
1. Now the user hrmgr has all these roles assigned, and the user will be able to log in to BI Publisher
Enterprise, create reports, analyze data using online and Excel analyzer, and also build and publish
templates for the reports.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
110 Oracle BI Publisher 10g R3: Fundamentals
2. Instead of assigning all the various roles to the user explicitly, you can define a single rolefor
example, HRManagerand assign all the required roles to this role, and then assign this role to any
user who is an HR manager in the organization, or to a user who requires similar privileges.

If you have time, try the following:

Creating a Role

10. In the Security Center, click the Roles and Permissions tab. This invokes the Security Center page.
11. Click Create Role.
12. Enter a role name (for example, HRManager), optionally enter a description, and click Apply.

Note: Once a role is created, you can add folders, data sources, and other roles to it.

Adding a Folder to a Role
13. In the Security Center, click the Roles and Permissions tab. This invokes the Security Center page.
Here you see the list of existing roles and permissions.
14. Click the Add Folders icon for the HRManager role to give access to the folders.
15. Select the desired folders from the Available Folders list and click Add Folder to move it to the Allowed
Folders list.
16. Click Apply when done.



Note that the folders are presented as the directory structure is set up in your system. Selecting the top-level
folder will grant access to all subfolders. Selecting just the subfolder entry will allow access only to the
subfolder.



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
Oracle BI Publisher 10g R3: Fundamentals 111
Add a Data Source to a Role

17. Ensure that you are on the Roles and Permissions page. Click the Add Data Sources icon for the
HRManager role.
18. Move selections from the Available Data Sources list to the Allowed Data Sources list; similarly select the
required file directories data sources. When you are done, click Apply. (See the following screenshot.)
Note: Users with this role will only be allowed to create or run reports that access data sources on the
Allowed Data Sources list. However, Administrator (or the users with the BI Publisher Administrator role)
is the only user who can access all the data sources.




Adding a Role to a Role
19. On the Roles and Permissions page, click the Add Roles icon for the HRManager.
20. Select the desired roles from the Available Roles list, and click Move to move these to the Included Roles
list (See the following screenshot.)
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
112 Oracle BI Publisher 10g R3: Fundamentals


21. Click Apply when done.

Note: Now this role can be assigned to the hrmgr user that you have created before, or to any other user
who requires similar privileges.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
Oracle BI Publisher 10g R3: Fundamentals 113
Practice 9-3: Setting Up Delivery Options: Email

Overview
In this practice you set up the email server (available on your system) so that the BI Publisher reports can be
delivered as email attachments.

Assumptions
BI Publisher services are up and running, and you have the administrator privileges.

Tasks
Setting Up the Email Server
1. In BI Publisher Enterprise, click the Admin tab.
2. On the Admin page, click Delivery Configuration in the Delivery section.
3. On the Delivery Configuration page, observe the various delivery media that can be configured, and then
click the Email tab to start defining the email server options.
4. Click Add Server.
5. Enter the name and host for the email server. (Check with your instructor for the email server details.)
6. Enter the following fields as appropriate:
General fields: Port
Security fields: Username and Password (In your lab environment, enter BIPUser@localhost.com as
Username, and BIPUser as password. However, confirm these details with your instructor)




























O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 9: Oracle BI Publisher Server: Administration
114 Oracle BI Publisher 10g R3: Fundamentals


7. Check whether the email server that you added is displayed in the list on the Email page of the Delivery
Configuration page.

Note: Also, if you have time, you can try the other Administrative settings for the BI Publisher Server using
the steps defined in Lesson 9. Scheduler configuration is covered in Practice 10. Setting up Integration with
other BI products is covered in Lesson 13.




























O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 115
Practice 10: Scheduling Reports and Analyzing Data
Goal
To configure the scheduler, schedule reports, and analyze data
Scenario
You use the reports that you created in previous practices to schedule and analyze data.
Outcome
You will schedule and manage the scheduled reports. You will view the data in the
scheduled reports. You will also analyze the data using online and Excel Analyzer.
Time
5060 minutes
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
116 Oracle BI Publisher 10g R3: Fundamentals
Practice 10-1: Scheduling BI Publisher Reports and Managing the
Scheduled Reports

Overview
In this exercise you configure the BI Publisher scheduler, schedule BI Publisher report, and view the data in
the report. Also, you explore the options to manage the scheduled reports.
Assumptions
You have completed Practice 9 (and other practices).
You have the Administrator privileges to configure the BI Publisher scheduler.
You have the bipsched (BI Publisher scheduler) user in Oracle Database to set up the scheduler
schema tables.
(This user must exist in your database in the lab environment, check with your instructor. If this user
does not exist, you can create the user in the database by logging in to SQL* Plus as the sys user,
using the following SQL statements:
SQL> create user bipsched identified by bipsched
default tablespace users
temporary tablespace temp
quota unlimited on users;
SQL> grant connect, resource to bipsched;


Tasks

Configure BI Publisher Scheduler
1. Log in to BI Publisher as Administrator (Password: Administrator). Click the Admin tab.
2. On the Admin page, click the Scheduler Configuration link in the System Maintenance section.
3. On the Scheduler Configuration page:
Select Oracle 10g from the Database Type drop-down list.
Enter the Connection String in the format: jdbc:oracle:thin:@<Host name>:
<Port>:<SID> for example, a sample connection string may look like:
jdbc:oracle:thin:@myhost:1521:orcl. (Check the exact hostname for your system.)
Enter bipsched as the username and password.
Ensure that oracle.jdbc.driver.OracleDriver is selected as Database Driver Class.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 117


Click Test Connection. This displays a confirmation message if the database connection is
successfully established for the bipsched user:



4. Click Install Schema to install the required scheduler schema tables. After the scheduler tables are
installed, a message indicates success. Sign out of BI Publisher.



5. Restart BI Publisher Server (OC4J services) by doing the following: from the Start Menu in Windows,
select Oracle Business Intelligence > Stop OC4J, now select Oracle Business Intelligence > Start
OC4J.

Note: Any changes to the configuration require you to restart BI Publisher Server.

Schedule a BI Publisher Report

6. In BI Publisher, click the Reports tab to see the Reports page.
7. Navigate to My Folders > Learn.
8. Click the Schedule link that is below the Based on OracleDB report.
Note: The Schedule link for the reports is activated after you have configured the BI Publisher scheduler.
9. On the Schedule Report page, select one of the available templates, and select PDF as the format for
the report to be scheduled.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
118 Oracle BI Publisher 10g R3: Fundamentals
10. Enter Based on OracleDB-Scheduled as the job name, and select language and time options as per
your requirements. Also, ensure that the Save Data for Republish and Save Output options are
selected.






























11. In the Time section of the Schedule Report page, select the frequency of the report to be run. (You can
select Run Daily/Weekly; however for the lab purposes, select Run Immediately or select the day and
time close to your current system time to run the report immediately). Click Submit to create the schedule
job.
Note: If you select the run Daily/Weekly option, you can also select which day of the week to run the
report, and the timings. Select an Active Start Date and Active End Date.




















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 119
12. A message indicates that the scheduling job is created successfully. Note that the scheduled job is now
displayed on the Schedules tabbed page. You can also see that the scheduled job was run at the
scheduled time.




View the Saved Output and History

13. Click the History tab to view the report history. You can see the Data XML, and Document columns in
the history table for the scheduled report. Click the icon in the Document column to see the saved report.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
120 Oracle BI Publisher 10g R3: Fundamentals



This displays the report generated when the schedule was executed, using the template and format that
you selected while scheduling the report. Also, you can view the job information by clicking the job name.


Manage Scheduled Jobs and Job Histories

14. You can manage the scheduled jobs as well as the job histories.
Do not delete any jobs now; however, be aware that on the History tabbed page, you can delete the job
history for a specific job. Similarly, you can suspend, resume, or delete a scheduled job on the Schedules
tabbed page.

Note: For this lab, do not delete the job that you created in the previous practice.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 121




















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
122 Oracle BI Publisher 10g R3: Fundamentals
Practice 10-2: Scheduling a Report With Advanced Options:
Bursting to a File Location

Overview
In this exercise you create a report with suitable key fields suitable for bursting, and you schedule a report to
burst to a file location on your system.
Assumptions
You have completed Practice 10-1, Practice 9, and other practices.
Tasks

Create a Report with Appropriate Key Fields for Bursting
1. Log in to BI Publisher as Administrator (Password: Administrator). Click the Admin tab.
2. In BI Publisher, create a new report, and enter Bursting to File as the name for the report.



3. Edit the report to create a new data model for the report. (Click the Data Model node, and then click New
to define a new data model for the report.)
4. On the Data Set screen that appears, ensure that SQL Query is selected as the type, and select the
demo data source. Select the Cache Results check box.
Enter the following query in the SQL Query section:
select e.first_name || ' ' || e.last_name name, e.first_name, e.last_name,
e.salary, e.salary*12 ANNUAL_SALARY, e.salary*12*0.28 FED_WITHHELD,
j.job_title, d.department_name, m.first_name || ' ' || m.last_name manager
from employees e,employees m,departments d,jobs j
where e.department_id = d.department_id
and j.job_id = e.job_id
and e.manager_id = m.employee_id
and e.department_id = nvl(:dept,e.department_id)
and e.employee_id = nvl(:emp,e.employee_id)
order by
e.department_id, e.manager_id


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 123
Note: This query is provided in the Prac10-2-4_BurstingQuery.txt file in D:\Labs\BIP_10.1.3.3_Labs
folder so that you can also copy and paste the query. Check with your instructor for the exact path.

The following shows the Data Set screen:



5. Click the Save icon to save the report.
Note: You can click View to see whether the query is returning valid XML data.

Publish an RTF Template for the Report

6. In Word, open the Salary Expenses by Manager.RTF template file provided with this course. You
can find this file in D:\Labs\BIP_10.1.3.3_Labs\Templates. (Check with your instructor for the correct drive
and path name.)


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
124 Oracle BI Publisher 10g R3: Fundamentals
The template file looks like this:




7. In Word, log in to BI Publisher as Administrator. This displays the Open Template dialog box. Navigate to
My Folders> Learn, and open the Bursting to File report that you created earlier.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 125
8. Select Preview > PDF to preview the report data.



9. Upload this template for the report (Select Upload Template As from the Oracle BI Publisher menu in
Word. Enter Template1 as the name, and click OK to upload the template to BI Publisher Server. This
uploads the template, and displays a message indicating the template has been uploaded for the report.)

Define Bursting Properties for the Report
10. Now go back to BI Publisher Enterprise and open the Bursting to File report in Edit mode.
11. On the Report Properties screen, click the Bursting node in the Report section on the left, to define
bursting properties for the report.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
126 Oracle BI Publisher 10g R3: Fundamentals
This displays the Bursting Properties screen on the right. In the General Properties section,
Select department name as the Split By and Deliver By fields (Ensure that
ROWSET/ROW/DEPARTMENT_NAME is selected from the Split By drop-down list, also
ROWSET/ROW/DEPARTMENT_NAME from the Deliver By drop-down list.)
In the Delivery Data Source section, select demo as the Data Source, and add the following query
in the SQL Query section:
select d.department_name KEY, 'Template1' TEMPLATE, 'RTF' TEMPLATE_FORMAT,
'en-US' LOCALE, 'PDF' OUTPUT_FORMAT, 'FILE' DEL_CHANNEL, D:\BIP'
PARAMETER1,
d.department_name || '.pdf' PARAMETER2
from departments d
The syntax of the query parameters is explained in the lesson.
Note: The above query is provided in the Prac10-2-12_BurstingProperties.txt file in the
D:\Labs\BIP_10.1.3.3_Labs folder.
Ensure that you select the Enable Bursting option.




12. Click the Save icon to save the changes you made to the report.
13. Create a folder named BIP on the C: drive on your system, as this will be used as the destination folder
for bursting.

Schedule a Report to Burst to File Location

14. Ensure that you saved the report after defining the bursting properties, and click Schedule to schedule
this report to burst to the file location defined.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 127


15. This takes you to the Schedule page. Click Schedule a New Job to define the scheduling job. On the
Schedule Report page, define the following:
In the Job Properties section, select the Burst Report option.



































Further define the other options:
Select the Run immediately option in the Time section and click Submit. (For demo or practice
purposes we select the Run Immediately option, but you can actually schedule the report to be
run daily/weekly/ monthly according your requirements.)












This displays the message saying the job is successfully created. (The job is also displayed in the
Schedules page).
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
128 Oracle BI Publisher 10g R3: Fundamentals

16. Click the Schedules tab and then click History to see whether the schedule was run successfully.

17. Go to the BIP folder (the delivery destination folder you provided in the query). You can see that PDF
files, which have <Department Name>. PDF as the titles, are bursted to this file location.















































O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 129
18. Open one of the files to see the report, for example, Sales.pdf.



Note: The steps for bursting to email are similar to the ones given above, with the exception that the query
has a different set of parameters for defining bursting properties. These are discussed in Lesson 9, and if you
have time, you can try the Bursting to Email feature using the example described in Lesson 9.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
130 Oracle BI Publisher 10g R3: Fundamentals
Practice 10-3: Scheduling a Report to Be Delivered as an Email
Attachment

Overview
In this exercise you schedule a report, and select email as the delivery media for the report. (You should have
configured the email server in Practice 9.)
Assumptions
You have completed Practice 10-1, 10-2, Practice 9.
You have the BIPUser configured on your hMail server. (This must be configured in your lab, check with your
instructor.)
You have configured Outlook Express to create an email account that will receive the BI Publisher notifications
and mails. (This may not have been configured on your system, check with your instructor, and follow the steps
listed below):
(a) Open Outlook Express by selecting Start > Programs > Outlook Express.
(b) Click No if asked to make Outlook Express your default mail client.
(c) If necessary, click Cancel to close the Internet Connection Wizard.
(d) Select Tools > Accounts from the menu.
(e) Select the Mail tab.
(f) Click the Add button and select Mail from the pop-up menu.
(g) Enter BIPUser in the Display name text box.
(h) Click Next.
(i) Enter BIPUser@localhost.com in the Email address field.
(j) Click Next. Accept POP3 as the incoming mail server.
(k) Enter localhost in the Incoming mail server field.
(l) Enter localhost in the Outgoing mail server field.
(m) Click Next.
(n) Enter BIPUser in the Password text box.
(o) Click Next.
(p) Click Finish
(q) Click Close.
(r) Minimize the Outlook Express window.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 131

Tasks

Scheduling a Report to Be Delivered as an Email Attachment
1. In BI Publisher, open a report (for example, Based on OracleDB or any other report that you created
earlier).
2. Click the Schedule link to schedule the report. On the Schedule Report page enter the following: (This
step is common to scheduling any report):
Select an appropriate template and PDF as the format.
Enter a job name for the scheduled report, for example, Based On OracleDB- Email.
In the Notification section, enter the email address of the user for whom you have configured the
mail server (Check with your instructor for the email user details, for example,
user@myMailServer.myCompany.com.), and select the Notify When > Report completed
option.
Select the Run Immediately option, and click Add Destination in the Delivery section to add
email as the destination. (See the following screenshots.)






















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
132 Oracle BI Publisher 10g R3: Fundamentals


3. The Delivery dialog box displays the available destinations that are configured. Select Email. Now the
screen displays email options such as To, CC, Subject, and Body of the email. Enter the appropriate
data, and click Submit.



Note: You should have configured the email server and the user prior to scheduling the report to be delivered
as email. If not, email does not appears as a delivery media.

4. Open Outlook Express or the mail client that you have configured and log in as the configured user, and
you should be able to see the Scheduled email in the Inbox.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 133
Practice 10-4: Analyzing Data by Using Online and Excel Analyzers

Overview
In this exercise you analyze the data in a report using the online and Excel analyzers. You will use the
Order_Info crosstab report that was created in Practice 6-9.
Assumptions
You have completed Practice 10-1, 10-2, Practice 9 (and also other practices).
You have to log in to BI Publisher Enterprise using the URL: http://localhost:9704/xmlpserver/.

Note: This is required for Excel Analyzer to work properly, as it resolves the URLs in a different
way.
Tasks

Using Online Analyzer
1. Log in to BI Publisher as Administrator using the URL, http://localhost:9704/xmlpserver/, and open the
Order_Info report that you want to analyze in View mode. (Click the View link below the name of the
report.)
2. Click Analyzer to open the online crosstab analyzer. (The Analyzer interface displays the list of data
fields in the left pane and an empty crosstab structure on the adjacent pane as shown in the following
screenshot.)
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
134 Oracle BI Publisher 10g R3: Fundamentals



3. In BI Publisher Online Analyzer screen, from the ROWSET fields displayed on the left, drag the
appropriate items to Row Fields, Data Items, and Column Fields as given below to create the crosstab.
Drag and drop:

ORDER_TOTAL to the Data Items area
SALES_MGR_NAME, and then SALES_REP_NAME to the Column Fields area
CUSTOMER_NAME, and then ORDER_DATE to the Row Fields area
The BI Publisher Online Analyzer screen should look like this:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 135


You can see that Karen and her team of sales representatives have sales of 1,260,054 USD, and
that is the highest. You can also drill down on Karen to see which sales representative of her
team is doing well. You can see that Sarath has generated a sales of 661,735 USD. Also, you
can also see that Markus and Matthias are the elite customers, and gave a business of 290,296
USD and 217,182 USD respectively. (See the following screenshots.)


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
136 Oracle BI Publisher 10g R3: Fundamentals

This kind of quick analysis online helps you to take quick business decisions. For example,
Sarath can be given some incentives or bonus for generating phenomenal business, and Markus
can be offered some special discounts for being the elite customer.
You can also drag and drop some fields as page items. For example if you want to have the data
represented by Sales manager, you can drag the SALES_MGR_NAME field to the page items
field.

4. You can save your analysis as a template for the report using the Save or Save As options displayed in
the Online Analyzer toolbar. Close the online analyzer after your analysis is done.



Note: You can also change the structure of the crosstab according to the requirements of your data
analysis to come up with some important business decisions or initiatives. You can also analyze the
report data in Excel using the Analyzer for Excel provided by BI Publisher.


































O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 137
Using Excel Analyzer

Note
If Excel Analyzer is not installed on your system, or if you do not have the latest version, then the first
time you use Analyzer for Excel (that is when you click the Excel Analyzer link for a report), you will
be prompted to install the latest version. Follow the instructions to install Analyzer for Excel or the
update. (The installation should not take more than a couple of minutes.)
You can also install Excel Analyzer from BI Publisher Enterprise. Log in to BI Publisher as
Administrator, and click the Reports tab. In the Reports page, click the Analyzer For Excel link
found in the Developer Tools section. Follow the installation instructions.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
138 Oracle BI Publisher 10g R3: Fundamentals


To use the Excel Analyzer with a BI Publisher report:
1. In BI Publisher, open the Order_Info report that you want to analyze in View mode.
2. Click Analyzer for Excel. You will be prompted to save or open the <report name>.xls (that is
Order_Info.xls) file.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
Oracle BI Publisher 10g R3: Fundamentals 139


3. Click Open to open the file, and select Enable Macros from the Excel dialog box.
Note: You must enable macros to use the Analyzer for Excel.
4. The report data is rendered in the Excel application window and the Oracle BI Publisher menu appears
on the Excel menu bar.
Note: The report data rendered in Excel is the result of the report query with no template and with default
filtering applied. You can now format the data as you want in Excel. If you have time, use your Excel skills
to format the data in Excel. Note that if the report has parameters, the parameter names appear at the top
of the worksheet, but you must log in to BI Publisher from Excel to apply new parameter values.
5. After formatting your report data in Excel, log in to BI Publisher as Administrator from Excel. This
activates the menu options in BI Publisher Menu.
6. You can publish the template using Oracle BI Publisher > Add as New Excel Template. Enter an
appropriate name for the template.
Note: The next time when you log in to BI Publisher Enterprise Server, you can see this new template added
to the report.






















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 10: Scheduling Reports and Analyzing Data
140 Oracle BI Publisher 10g R3: Fundamentals





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
Oracle BI Publisher 10g R3: Fundamentals 141
Practice 12: Create XML Data Templates
Goal
To practice basic XML data template development techniques so that you can understand
their range of capabilities for XML data generation
Scenario
You create an XML data template that generates a simple query against the database. You
then structure the data for display purposes. You then create a second data template that
incorporates a parameter and an LOV. Finally, you associate the second data template
with an RTF template to produce a BI Publisher report.
Outcome
You will view the results of the XML data templates in BI Publisher.
Time
1 hour
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
142 Oracle BI Publisher 10g R3: Fundamentals
Practice 12-1: Create a Simple XML Data Template

Overview
In this practice, you create an XML data template to query the database and you format the query into an
XML data source capable of being used by BI Publisher.
Tasks

Create a Simple XML Data Template
1. Log in to BI Publisher Enterprise server.
2. Navigate to the My Folders > Learn folder.
3. Create a new report called SimpleDataTemplate.
4. Click the Edit link under the report name, and then click Data Model and New.

5. Under General Settings, enter the name firstDT and set the type to Data Template.
6. Add the following code in the Data Template text area:
<dataTemplate name="firstDT" dataSourceRef="demo">
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[ SELECT * FROM EMPLOYEES]]>
</sqlStatement>
</dataQuery>
</dataTemplate>
7. Click Save.
8. To see the XML created by your data template, click View at the top of the page and then click View
within the report. The structure of the XML file reflects the structure of the source data in the query.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
Oracle BI Publisher 10g R3: Fundamentals 143

. . .
. . .
You can structure the XML data by adding code to the data template.
9. Click Edit at the top-right side of the report page, and then click firstDT in the Data Model section.
10. Replace the original code in the Data Template text area with the following.
(Hint: You can copy this code segment from the file D:\Labs\BIP_10.1.3.3_Labs\Prac12-1-
10_Code.txt.)
<dataTemplate name="firstDT" dataSourceRef="demo">
<properties>
<property name="xml_tag_case" value="upper"/>
</properties>
<parameters/>
<lexicals>
</lexicals>
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[ SELECT HIRE_DATE, EMPLOYEE_ID,FIRST_NAME,
LAST_NAME, SALARY, COMMISSION_PCT, JOB_ID,
EMAIL, PHONE_NUMBER, DEPARTMENT_ID, MANAGER_ID
FROM EMPLOYEES]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_EMP" source="Q1">
<element name="EMPLOYEE_ID" value="EMPLOYEE_ID"/>
<element name="FIRST_NAME" value="FIRST_NAME"/>
<element name="LAST_NAME" value="LAST_NAME"/>
<group name="G_EMPINFO" source="Q1">
<element name="JOB_ID" value="JOB_ID"/>
<element name="HIRE_DATE" value="HIRE_DATE"/>
<element name="EMAIL" value="EMAIL"/>
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
144 Oracle BI Publisher 10g R3: Fundamentals
<element name="PHONE" value="PHONE_NUMBER"/>
<element name="SALARY" value="SALARY"/>
<element name="COMMISSION_PCT" value="COMMISSION_PCT"/>
<element name="DEPARTMENT_ID" value="DEPARTMENT_ID"/>
<element name="MANAGER_ID" value="MANAGER_ID"/>
</group>
</group>
</dataStructure>
</dataTemplate>
11. Click Save.
12. To see the XML created by your data template, click View at the top of the page and click View within the
report.
Observe how the structure of the XML data has changed, reflecting the dataStructure tag.

. . .
. . .


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
Oracle BI Publisher 10g R3: Fundamentals 145
Practice 12-2: Data Templates: Using RTF Templates, Parameters,
and LOVs
Overview
In this practice, you create an XML data template to produce the Employee Salary report that you created
previously. First, you use the XML data template code only to view the XML data structure. Then, you simplify
the code and add an RTF template to view the report. Next, you add a parameter to the data template that
enables the user to specify a particular department for the report. Finally, you add a List of Values (LOV)
object and associated it with the report parameter.
This XML data template illustrates one of the features of BI Publisher. Namely, that objects such as RTF
templates, parameters, and LOVs may be leveraged by different types of reports.
Tasks
Create a New Data Template
1. Navigate to the Learn folder by selecting My Folders > Learn.
2. Create a new report named DataTemplateEmpSal.
3. Click the Edit link under the report name.
4. Click Data Model and New.
5. Under General Settings, set the name as secondDT and the type as Data Template.
6. Enter the following code in the Data Template text area
(Hint: You can copy this code segment from the file D:\Labs\BIP_10.1.3.3_Labs\Prac12-2-
6_Code.txt.):
<dataTemplate name="secondDT" dataSourceRef="demo">
<properties>
<property name="xml_tag_case" value="upper"/>
</properties>
<parameters/>
<lexicals>
</lexicals>
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[ SELECT D.DEPARTMENT_NAME,
E.FIRST_NAME || ' '||E.LAST_NAME as EMPLOYEE_NAME,
E.HIRE_DATE as HIRE_DATE, E.SALARY as SALARY
from DEPARTMENTS D, EMPLOYEES E
where D.DEPARTMENT_ID=E.DEPARTMENT_ID]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_DEPT" source="Q1">
<element name="DEPARTMENT_NAME" value="DEPARTMENT_NAME"/>
<group name="G_EMP" source="Q1">
<element name="EMPLOYEE_NAME" value="EMPLOYEE_NAME"/>
<element name="HIRE_DATE" value="HIRE_DATE"/>
<element name="SALARY" value="SALARY"/>
</group>
</group>
</dataStructure>
</dataTemplate>
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
146 Oracle BI Publisher 10g R3: Fundamentals
7. Click Save.
8. Click View at the top of the page and click View within the report. Notice that the structure of the XML
data is similar to the structure of the Employee Salary report that you created previously.

. . .
. . .
Copy the XML Data Template, Modify the Code, and Add an RTF Template
9. Click Learn to navigate to your report folders.

10. Click the Report Actions icon next to DataTemplateEmpSal.

11. Select Copy the report from the navigation bar. Then select Paste from clipboard.
Result: A copy of the Data Template appears.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
Oracle BI Publisher 10g R3: Fundamentals 147
12. Click the Report Actions icon next to the copied report. Select Rename this report from the Navigation
pane and name the report DataTemplateWithRTF.
13. Click Edit under DataTemplateWithRTF.
14. Click the secondDT data model to view the data template code.
15. Remove the dataStructure tag code. The resulting data template should look like this:
<dataTemplate name="secondDT" dataSourceRef="demo">
<properties>
<property name="xml_tag_case" value="upper"/>
</properties>
<parameters/>
<lexicals>
</lexicals>
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[ SELECT D.DEPARTMENT_NAME,
E.FIRST_NAME || ' '||E.LAST_NAME as EMPLOYEE_NAME,
E.HIRE_DATE as HIRE_DATE, E.SALARY as SALARY
from DEPARTMENTS D, EMPLOYEES E
where D.DEPARTMENT_ID=E.DEPARTMENT_ID]]>
</sqlStatement>
</dataQuery>
</dataTemplate>
16. Click Save.
17. Click View, and then View again. Now, the XML data is not grouped by Department.

. . .
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
148 Oracle BI Publisher 10g R3: Fundamentals
18. Make slight changes to the EmpSalRep_Modified.rtf template that you created previously. Then, upload it
for use with the DataTemplateWithRTF report.
a. Launch Word.
b. Open the EmpSalRep_Modified.rtf template.
c. Double-click the group ROW by DEPARTMENT_NAME field.

Result: The Advanced tab of the BI Publisher Properties window appears, as shown here:

d. In both the Code and the Text to display boxes, change ROW to Q1, like this:

Note: This change will reference the Q1 name in the XML Data Templates <sqlStatement> tag.
e. Click OK to update the field.
f. Double-click the end ROW by DEPARTMENT_NAME field to display the BI Publisher Properties
window.
g. In the Text to display box, change ROW to Q1. (The code does not need any modification.)
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
Oracle BI Publisher 10g R3: Fundamentals 149
h. Click OK to update the field.
The table in the RTF template should now look like this:

i. Select File > Save As, and save the modified file as EmpSalRep_DT.rtf.
j. Log on to BI Publisher (select BI Publisher > Log On) using the Administrator credentials.
k. In the Open Template window, navigate to My Folders > Learn.
l. Select the DataTemplateWithRTF report and click Open Report.
m. Select BI Publisher > Upload Template As.
n. In the Upload as new window, enter Sal Rep DT as the name for the template, and click OK. Click
OK again in the confirmation window.
o. Right-click the pie chart and select BI Publisher Chart. In the Chart window, click Preview.
Note: This action updates the chart to reference the Q1 name in the XML data templates
<sqlStatement> tag.
p. Click OK to close the Chart window.
q. Finally, select BI Publisher > Update Layout Template. Result: The RTF template is updated for
use with the XML Data Template.

r. Click OK in the confirmation window.
19. Go to BI Publisher Enterprise. Click Sign Out, and then log back in using the Administrator credentials.
20. Navigate to the Learn folder and click Edit under the DataTemplateWithRTF report. The uploaded
template appears under the Layouts node:

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
150 Oracle BI Publisher 10g R3: Fundamentals
21. To see the report, click View at the top of the page. Result: By default, the report is displayed in HTML
format, using the Sal Rep DT template.
22. Select PDF as the display format, and then click View.

23. Scroll down to the bottom of the report to view the pie chart.
24. Click Learn to return to your learn folder.

Add a Parameter to the XML Data Template
25. Click the Report Actions icon next to DataTemplateWithRTF.
26. Select Copy the report from the navigation bar. Then select Paste from clipboard.
27. Click the Report Actions icon next to the copied report. Select Rename this report from the Navigation
pane and name the report DataTemplateWithParam.
28. Click Edit under DataTemplateWithParam.
29. Click Parameters in the Report pane, and then click New.
30. In the Parameter screen displayed to the right, enter or select the following:
a. Identifier: dname
b. Data Type: String
c. Default Value: Sales
d. Parameter Type: Text
e. Display Label: Enter Department Name
31. Click Save to save the Parameter.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
Oracle BI Publisher 10g R3: Fundamentals 151
32. Click secondDT to view the Data Template code.
33. Modify the code as highlighted in bold to add the parameter:
<dataTemplate name="secondDT" dataSourceRef="demo">
<properties>
<property name="xml_tag_case" value="upper"/>
</properties>
<parameters>
<parameter name=dname/>
</parameters>
<lexicals>
</lexicals>
<dataQuery>
<sqlStatement name="Q1">
SELECT D.DEPARTMENT_NAME,
E.FIRST_NAME || ' '||E.LAST_NAME as EMPLOYEE_NAME,
E.HIRE_DATE as HIRE_DATE, E.SALARY as SALARY
from DEPARTMENTS D, EMPLOYEES E
where D.DEPARTMENT_ID=E.DEPARTMENT_ID and
D.DEPARTMENT_NAME=:dname
</sqlStatement>
<dataQuery>
</dataTemplate>
34. Click Save.
35. Click View to view the report.

36. Enter Shipping in the parameter name box, select PDF as the format, and click View.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
152 Oracle BI Publisher 10g R3: Fundamentals


37. Click Learn to return to your reports folder.

Add a List of Values to the Report and Associate It with the Parameter
38. Click Edit to edit the report.
39. In the Report pane, click List of Values, and click New.


40. In the Details section of the List of Values screen, select demo as the data source, and click Query
Builder to define a query for defining a list of values.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
Oracle BI Publisher 10g R3: Fundamentals 153

41. In the Query Builder, select the HR schema, and then DEPARTMENTS.
42. Select the DEPARTMENT_NAME column and Save the query.


43. Click Save to save the changes to the report.
Next, associate the dname parameter with the List of Values object.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
154 Oracle BI Publisher 10g R3: Fundamentals
44. Under the Parameters node, click dname.
45. In the Parameter screen that appears on the right, select or enter the following:
a. Parameter Type: Menu (Result: the Menu Setting section appears.)
b. Display Label: Select Department Name:
c. List of Values: New List of Values 1
d. Options: Can select all (NULL Value Passed)



46. Click Save to save the changes to the report.
47. Click View to see the modified report. Notice that the parameter is now displayed as a list of values, from
which you can select a department name to view the data.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
Oracle BI Publisher 10g R3: Fundamentals 155

48. Choose different departments from the list and click View.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 12: Creating Reports by Defining XML Data Templates
156 Oracle BI Publisher 10g R3: Fundamentals

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 13: Oracle BI Publisher Integration Features
Oracle BI Publisher 10g R3: Fundamentals 157
Practice 13: Building a BI Publisher Report Using an
Oracle BI EE Subject Area
Goals
To create a BI Publisher report by building a logical query in BI Publishers Query
Builder using a BI Server metadata subject area
Scenario
You create a new report that uses a BI EE data source, building a logical query based
on BI Server metadata using the BI Publisher. You then upload an existing template to
define a layout for the report so that you can view the results.
Time
1520 minutes
Tasks
Create a New Report
1. If it is not still open, launch BI Publisher Enterprise, and log in as Administrator.
2. Navigate to My Folders > Learn.
3. Click Create a new report.
4. Enter BI EE Subject Area in the Enter Report Name field and click Create.
5. Click the Edit link below the new report.
6. Click Data Model and then click New.
7. In the Data Set pane, select Oracle BI EE from the Data Source drop-down list.

8. Click Query Builder to create the SQL query.
Result: The SupplierSales subject areas (from the BI Server metadata), appear in the Schema drop-down
list.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 13: Oracle BI Publisher Integration Features
158 Oracle BI Publisher 10g R3: Fundamentals
9. Click Customers, Periods, and Sales Facts in the left pane to add them to the Model workspace.

10. Select the following columns for the query from objects:
Customers: Region, State
Periods: Year
SalesFacts: Units Shipped

11. Click Results to run the query and to see a preview.

12. Click Save to save the reports data set.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 13: Oracle BI Publisher Integration Features
Oracle BI Publisher 10g R3: Fundamentals 159
Note: The logical SQL query appears. This query uses the logical names for the BI EE Server metadata
objects and is interpreted by the BI Server, which provides the result set.

13. Upload an exiting RFT template as a layout object for the report by performing the following:
a. Click Layouts and click New to define a layout for the report.
b. On the Layout page, enter Units by Region and State in the Name field.
c. Again click Layouts and, in the Manage Template Files section, click Browse.
d. In the Choose File dialog box, select the Units by State and Region.rtf file from
D:\Labs\BIP_10.1.3.3_Labs.
Note: This is an RTF template that has been prepared for the BI Publisher report that you have
created.
e. Click Upload to upload the template file. Result: The template name should appear as a link under
the Template (Click to download) heading, as shown here:

14. Click Save.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 13: Oracle BI Publisher Integration Features
160 Oracle BI Publisher 10g R3: Fundamentals
15. Click the View link to view the report.



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 161
Practice 14: Creating BI Publisher Reports Based on
Other Data Sources
Goal
To create BI Publisher reports based on other Data Sources such as Web Services, RSS
feeds, and files
Scenario
You create reports based on various data sources and view report data.
Outcome
You will view the report data using the predefined templates.
Time
3040 minutes
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources

162 Oracle BI Publisher 10g R3: Fundamentals
Practice 14-1: Create BI Publisher Report Based on Web Services
Overview
In this practice, you create a BI Publisher report based on Web Services to get stock quotes.
Assumptions
You should have:
Completed all the practices for all the lessons covered so far.
Set the proxy parameters, and restart the BI Publisher Sever as given below. (Check with your
instructor if these parameters are already set in the lab. This step may be necessary if you want to
access the Web Services or the RSS feeds URLs, which may be outside the organization firewall. So
you can follow the steps listed below to set the proxy parameters. Do not change the proxy settings if
they are already set.)
a. In the server startup file, that is oc4j.cmd file (found in <Oracle_Home>\oc4j\bin\) locate the
following line:
rem JVMARGS
set JVMARGS=-Djava.library.path=C:\oracle\bi\server\Bin;C:\oracle\bi\web\bin -
DSAROOTDIR=C:\oracle\bi -DSADATADIR=C:\oracle\bidata -XX:MaxPermSize=128m -
Xmx512m %OC4J_JVM_ARGS%
b. Update with the following string:
-Dhttp.proxyHost=<proxy.mycompany.com> -Dhttp.proxyPort=80

so the result will look like this:
rem JVMARGS
set JVMARGS=-Dhttp.proxyHost=<proxy.mycompany.com> -Dhttp.proxyPort=80 -
Djava.library.path=C:\oracle\bi\server\Bin;C:\oracle\bi\web\bin -DSAROOTDIR=C:\oracle\bi -
DSADATADIR=C:\oracle\bidata -XX:MaxPermSize=128m -Xmx512m %OC4J_JVM_ARGS%
c. Restart oc4j services. (From the Windows start menu select Oracle Business Intelligence>
Stop, and then select Oracle Business Intelligence> Start.)
Tasks
Create a New Report and Define the Web Services Data Set

1. Log in (if not logged in) to BI Publisher Enterprise as Administrator (password Administrator).
2. Navigate to your working folder (My Folders > Learn), and click Create a new report. Enter Based on
Web Services as the name of the report.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 163


3. Click the Edit link below the name of the report to open it in Edit mode.
4. Select the Data Model node on the left, and click New to define a new data model for the report. Select
the new data set that is created and define the following:
Select Web Service from the Type drop-down list.
Enter http://www.webservicex.net/stockquote.asmx?WSDL in the WSDL URL field.
Enter GetQuote as the method name.



5. Save the changes to the report (by clicking the Save icon).

Note: WebserviceX.NET provides on-demand XML Web Services for financial, distribution, retail, health care,
manufacturing, telecom, government, and educational organizations or industries.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources

164 Oracle BI Publisher 10g R3: Fundamentals
Define a Parameter and Add it to the Data Set

6. Click Parameters and click New to add a parameter for the stock symbol.



7. On the Parameter page that appears:
Enter Quote as the identifier.
Select String from the Data Type drop-down list.
Enter orcl as the default value.
Select Text as the parameter type.
Type Enter Stock Symbol: in the Display Label field


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 165

8. Under the Data Model node, select the dataset for the Web services report (New Data Set1, in this
example). The Data Set page appears on the right. Ensure that Quote is selected in the Parameters
drop-down list, as shown here:



9. Click Save to save the changes to the report.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources

166 Oracle BI Publisher 10g R3: Fundamentals
View the XML Data

10. View the XML data to see if the stock quotes for Oracle Corporation are being returned to the report.




Note: You can also view the stock quotes for other corporations by entering appropriate stock symbols such
as msft (Microsoft), GE (General Electric), and so on.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 167
View the Data by Using a Predefined Template, and Publish the Template

11. In Word, open the WebServices.rtf template file. (You can find this template file in
D:\Labs\BIP_10.1.3.3_Labs\Templates.)

Note: The predefined templates are provided to save you time in creating them. However, the data field
names and column names may change as these are from a Web Service. If the template is not working,
create an RTF template.

12. Log in to Oracle BI Publisher in Word. The Open Template window appears. Navigate to
My Folders> Learn. Select the Based on Web Services report, and click Open Report.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources

168 Oracle BI Publisher 10g R3: Fundamentals


13. On the Word Template Builder toolbar, select Preview > PDF to preview the data in the report using this
template.



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 169
14. Select Oracle BI Publisher > Upload Template As to publish the template for this report.
Enter any appropriate name for the template, and click OK. Click OK again when the confirmation
message appears.





















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources

170 Oracle BI Publisher 10g R3: Fundamentals
Practice 14-2: Create BI Publisher Report Based on XML/RSS
Feeds
Overview
In this practice, a simple site with RSS feed links (The New York Times) is used to show how the data is
rendered to a BI Publisher report.

Note: The RSS readers or aggregators are not used here, as they are out of the scope for this course.
Assumptions
You should have:
Complete all the practices for all the lessons covered so far.
Set the proxy parameters and restarted the BI Publisher Sever as noted in the Assumptions section
of the previous practice.
Tasks
Create a New Report and Define RSS Data Set
1. In BI Publisher, create a new report named Based on HTTP-RSS in the Learn folder.
2. Open the report in Edit mode. Select the Data Model node on the left, and click New to define a new data
model for the report.
3. Select the new data set, and enter or select the following in the Data Set page on the right:
Name: News
Type: HTTP (XML Feed)
URL: http://www.nytimes.com/services/xml/rss/nyt/Business.xml
Method: GET
Select the Cache Results option.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 171

4. Save the report.
View the Data in the Report as XML and Using a Predefined Template
5. View the XML data to see whether the RSS feeds site is rendering data to the report.


6. In Word, open the HTTP-RSS.rtf template file (found in D:\Labs\ BIP_10.1.3.3_Labs\Templates folder),
the file looks similar to this:



Note: The predefined templates are provided to save you time in creating them. However, the data field
names and column names may change as these are from a RSS feed. If the template is not working, create
an RTF template.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources

172 Oracle BI Publisher 10g R3: Fundamentals
From Word, log in to Oracle BI Publisher as Administrator. The Open Template window appears. Open the
Based on HTTP-RSS report from My Folders > Learn.



7. Select Preview > PDF to preview the data. A portion of the data is shown in the screen:



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 173
8. Now select Oracle BI Publisher > Upload Template As to publish the template for this report. Enter an
appropriate name for the template and click OK. Click OK again when the confirmation message is
displayed.


















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources

174 Oracle BI Publisher 10g R3: Fundamentals
Practice 14-3: Create a BI Publisher Report Based on a File
Overview
In this practice, you create a BI Publisher report based on an external file.
Assumptions
You should:
Have completed all the practices for all the lessons covered so far.
Ensure that the demo files data source is defined. (By default, the directory <Oracle
Home>/xmlp/XMLP/DemoFiles is defined as a File data source).
Check the following: (To see if the data source is defined)
1. Log in to BI Publisher as Administrator, click the Admin tab, and then, in the Data Sources section,
click File.
2. Check that the demo files directory is added as a File data source. (The default name is demo files).
Note: If this data source is not defined, define the File data source by adding the correct directory path
for the demo files. (Click Add Data Source.)
Tasks
Create a New Report and Define the File as a Data Set
1. Navigate to the Learn folder, and create a new report. Enter Based on File as the name of the report.
2. Open the report in Edit mode, and define a new data source for the report.
Hint: Click Data Model, and click New to define the data source.
3. Select the new data set that is created and enter the following details in the Data Set screen:
Select File from the Type drop-down list.
Ensure that demo files is selected as the data source.
Enter PODataSample.xml as the file name.
Note: A number of XML files are provided as demo files with BI Publisher, and the
PODataSample.xml file contains XML definitions of sample purchase order data.


4. Click Save to save the report.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 175
View the Data in the Report as XML

5. Check whether the report is returning valid XML data. Click View to go to the View mode of the report,
and click View again to view the XML data. (A portion of the sample purchase order XML data is shown
in the following screen.)



Upload a Sample Template in BI Publisher Enterprise, and View the Data
6. Go to the Edit mode of the report. (If you are in the View mode of the report, click the Edit link to go back
to the Edit mode.)
7. Click Layouts in the Report pane on the left. The Create Layouts window appears on the right.
8. Click Browse in the Manage Template Files section to find a predefined RTF template.
9. In the Open dialog box, navigate to the <Oracle Home>/xmlp/XMLP/Reports/Supply Chain
management/Purchase Order folder. Select POTemplateSample.rtf and click Open.

















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources

176 Oracle BI Publisher 10g R3: Fundamentals
10. Click Upload to upload this RTF template for the report.



11. Click Save to save the layout changes to the report.
12. Click Layouts again, and click New to create a new report layout to associate it with the template that
you uploaded as shown below on the left. Then, in the Layout section that is displayed on the right, make
sure that POTemplateSample.rtf is selected from the Template drop-down list, and All formats is
selected as the Output Format.



13. Once again, Save the changes to the report layout.
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
Lesson 14: Creating Reports Based on Other Data Sources
Oracle BI Publisher 10g R3: Fundamentals 177
14. View the data in the report using the template that you uploaded. The report looks like this:



















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y
















O
r
a
c
l
e

I
n
t
e
r
n
a
l

&

O
r
a
c
l
e

A
c
a
d
e
m
y
U
s
e

O
n
l
y

También podría gustarte