Вы находитесь на странице: 1из 442

11i Oracle XML Publisher

Fundamentals (NAMER)

y
m

Student Guide Volume 1

e
d
a

D51925GC10
Edition 1.0
September 2007
D52507

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Authors

Copyright 2007, Oracle. All rights reserved.

Leta Davis
Donna T.C. Johnson
Bill Sawyer
Kasturi Shekhar

Disclaimer

Technical Contributors
and Reviewers
Tim Dexter
Mike Donohue
Klaus Fabian
Tim McGlue
Brian Pottle
Pradeep Sharma
Kathy Wohnoutka

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:

Editor

Graphic Designer

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.

Satish Bettegowda

Trademark Notice

Publisher

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other


names may be trademarks of their respective owners.

Richard Wallis

y
m

Sujatha Nagendra

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Contents
1

Introduction to Oracle BI Publisher


Course Objectives 1-2
Objectives 1-3
Name Changes 1-4
Course Agenda: Day 1 1-5
Course Agenda: Day 2 1-6
Course Agenda: Day 3 1-7
What Can Oracle BI Publisher Do? 1-8
Example: Financial Reports 1-9
Example: Business Reports 1-10
Example: Invoices 1-11
Example: Purchase Orders 1-12
Example: Sales Orders 1-13
Example: Contracts 1-14
Example: Government Forms 1-15
Example: Tax Forms 1-16
Example: Marketing Materials 1-17
Example: XML 1-18
Example: EDI/EFT 1-19
Why Use Oracle BI Publisher? 1-20
Document Management Requirements 1-21
Meeting Business Requirements 1-22
Classic Reporting Tool Issues 1-23
Oracle BI Publisher: Advantages 1-27
Oracle BI Publisher Advantages: One Template, Multiple Sources 1-28
Oracle BI Publisher Advantages: Batch Processing, XML APIs 1-29
E-Business Suite Uses Oracle BI Publisher 1-30
Before We Start: Additional Resources 1-31
Summary 1-32

e
d
a

y
m

Feature and Architecture Overview


Objectives 2-2
Oracle BI Publisher 2-3
Classic Reporting Paradigm 2-4
Oracle BI Publisher Paradigm 2-5
Ease of Use 2-6
Extract Once, Publish Many Times 2-7
Batch Processing 2-8

e
l
c

a
r
O

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I
iii

c
A

Report Bursting 2-9


Distributed Delivery 2-10
Inbound Document Capture 2-11
Government Forms 2-12
BI Publisher Multitier Architecture 2-13
Oracle BI Publisher Desktop 2-14
Oracle BI Publisher Layout Templates 2-15
Oracle BI Publisher Enterprise 2-16
Oracle BI Publisher Process Architecture 2-17
Data Sources 2-19
Oracle BI Publisher Data Engine 2-20
Oracle BI Publisher Underlying Technology 2-21
Performance and Scalability 2-22
Security 2-23
Internationalization and Language Support 2-24
Translation 2-25
Output Formats 2-26
Flexible Deployment Options 2-27
Oracle BI Publisher for Applications 2-28
Summary 2-29
3

Introduction to XML Standards


Objectives 3-2
Extensible Markup Language 3-3
Advantages of Using XML 3-4
XML Standards 3-5
Oracle XML Support 3-6
Example: A Simple XML Page 3-7
XML Document Structure 3-8
XML Declaration 3-9
Components of an XML Document 3-10
XML Elements 3-11
Markup Rules for Elements 3-12
XML Attributes 3-13
Using Elements Versus Attributes 3-14
XML Entities 3-15
XML Comments 3-16
A Well-Formed XML Document 3-17
Class Activity 3-18
Comparing XML and HTML 3-19
XML Development 3-20

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

iv

y
m

c
A

e
d
a

XML Namespaces 3-21


XML Namespace Declarations: Example 3-23
Why Validate an XML Document? 3-24
Document Type Definition 3-25
Simple DTD Declaration: Example 3-26
XML Schema 3-28
XML Schema Document: Example 3-30
XML Schema Versus DTD 3-31
XML Path Language 3-32
XPath Model 3-33
XSLT and XPath 3-34
XSL 3-35
XSLT 3-36
XSLT Stylesheet 3-37
XSLT Stylesheet: Example 3-38
Viewing the Transformed Document 3-39
Summary 3-41
Practice 3: Overview 3-42
4

Installing Oracle BI Publisher Desktop


Objectives 4-2
Obtaining Oracle BI Publisher Desktop 4-3
Obtaining Oracle BI Publisher Desktop for Oracle E-Business Suite 4-4
Installing Oracle BI Publisher Desktop 4-5
Downloading and Unzipping the Patch 4-6
Running the Installer 4-7
Choosing Setup Language 4-8
Welcome Screen 4-9
Designating a JRE Location 4-10
Word Tutorial Option 4-11
Designating a Destination Location 4-12
Ready to Install 4-13
Installing 4-14
Installation Finished 4-15
Summary 4-16
Practice 4: Overview 4-17

e
d
a

e
l
c

a
r
O

y
m

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Introduction to Oracle BI Publisher Desktop


Objectives 5-2
Oracle BI Publisher Desktop 5-3
Viewing the BI Publisher Desktop Add-In 5-4
v

c
A

Walk-Through Sample 5-5


Basic Template 5-6
Loading the Sample XML Data 5-7
Loading Complete 5-10
Inserting Fields 5-11
Choosing the Address Fields 5-12
Setting the Other Simple Fields 5-13
Previewing Progress 5-14
Setting Build Preferences 5-15
Build Options 5-16
Inserting a Table 5-17
Selecting Data Fields 5-18
Removing Selected Fields 5-19
Completing the Table 5-20
End Result 5-22
Changing Field Properties 5-23
Preview Your Progress 5-24
Creating a Chart 5-25
Inserting a Chart 5-26
Defining a Chart 5-28
Placeholder 5-29
Previewing Your Progress 5-30
Summary 5-31
Practice 5: Overview 5-32
6

y
m

e
d
a

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Creating RTF Templates


Objectives 6-2
Methods of Creating RTF Templates 6-3
Basic Method 6-4
Finishing the Basic Method 6-5
BI Publisher Template Viewer 6-6
Why Use Template Viewer? 6-7
Viewing the Report 6-8
Steps for Viewing a Report 6-9
Viewing the Report 6-10
Form Field Method 6-11
Loading the XML Data 6-12
Inserting Fields 6-14
Previewing Progress 6-15
Creating a Data Table 6-16
Using the Insert Table/Form Window 6-17

e
l
c

a
r
O

vi

c
A

Selecting G_RESPS 6-18


Dropping the Nodes 6-19
Completed Template 6-20
Previewing Your Report 6-21
Viewing the Report 6-22
Designing the RTF Template 6-23
Summary 6-24
Practice 6: Overview 6-25
7

Advanced RTF Template Techniques


Objectives 7-2
Know Your Data 7-3
Looking at Raw XML Data 7-4
Looking at the Field Dialog Box 7-5
Underlying Tags 7-6
Form Field Method Tags 7-7
Additional Tag Space 7-8
Premarkup Layout 7-9
Supported Native Formatting Features 7-10
Designing the Template Layout 7-11
Add Markup 7-12
Images and Charts 7-15
Adding a Chart 7-17
Chart Samples 7-18
Support for Drawings, Shapes, and Clip Art 7-19
Other Graphic Features 7-20
Data-Driven Shape Support 7-21
Background and Watermark Support 7-24
Template Features 7-25
Conditional Formatting 7-29
Page-Level Calculations 7-33
Data Handling 7-36
Variables, Parameters, and Properties 7-37
Advanced Design Options 7-40
Summary 7-41
Practice 7: Overview 7-42
Challenge Practice (7-7): Overview 7-43

e
l
c

ra

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Other Templates
Objectives 8-2
PDF Template Overview 8-3
vii

y
m

c
A

e
d
a

Supported Modes 8-4


Adding Markup to the Template Layout for Adobe Acrobat Users 8-5
Supported Field Properties Options 8-7
Creating a Check Box 8-8
Creating a Radio Button Group 8-9
Defining Groups of Repeating Fields 8-10
Adding Page Numbers 8-12
Adding Page Breaks 8-13
Performing Calculations 8-14
Run-Time Behavior 8-15
Downloaded PDFs 8-16
Using Downloaded PDFs with Form Fields 8-17
eText Templates 8-18
Structure of eText Templates 8-20
Row Types 8-21
Constructing Data Tables 8-22
Command Rows 8-23
Structure of the Data Rows 8-25
Setup Command Tables 8-27
Summarizing eText Templates 8-28
Summary 8-29
9

c
A

e
d
a

Installing Oracle BI Publisher Enterprise


Objectives 9-2
Oracle BI Publisher Enterprise 5.6.2 9-3
Instructions 9-4
System Requirements 9-5
Installation Steps: Windows 9-6
Installation Steps: Linux 9-8
Installation Steps: Database Configuration 9-10
Installation Steps: Test 9-11
Oracle BI Publisher 5.6.2 on Oracle E-Business Suite 9-12
Oracle BI Publisher 5.6.2 on Oracle E-Business Suite: Pre-Installation Steps 9-13
Oracle BI Publisher 5.6.2 on Oracle E-Business Suite: Downloading, Unzipping, and
Applying the Patch 9-14
Oracle BI Publisher 5.6.2 on Oracle E-Business Suite: Post-Installation Steps 9-15
Windows Installation Startup 9-16
Windows Installation Welcome 9-17
Specify Home Details 9-18
Installation Summary 9-19
Installation in Progress 9-20

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

viii

y
m

Installation Complete 9-21


Exit Installer 9-22
Create a Desktop Shortcut 9-23
Browse for the Server Startup 9-24
Select the Server Startup Script 9-25
Name the Shortcut 9-26
Shortcuts Created 9-27
Start the Server 9-28
Confirm Server Is Started 9-29
Startup Confirmed 9-30
Summary 9-31
Practice 9: Overview 9-32
10 Oracle BI Publisher Enterprise Administration
Objectives 10-2
Administration Options 10-3
Logging In to Enterprise 10-4
BI Publisher Enterprise Home Page 10-5
Administration Settings 10-6
Data Sources 10-7
Setting Data Sources: JDBC 10-8
Setting the JDBC Connection Information 10-9
Testing the JDBC Connection 10-10
Setting Data Sources: JNDI 10-11
Security Center 10-12
Users and Roles 10-13
Functional Roles 10-14
Setting Up Users and Roles 10-15
Setting Up Roles 10-17
Delivery 10-19
Setting Up Delivery Options: Configuration 10-20
Setting Up Delivery Options: Printer 10-21
Setting Up Delivery Options: Fax 10-23
Setting Up Delivery Options: WebDAV 10-24
Setting Up Delivery Options: Email or FTP 10-25
System Maintenance 10-26
Refreshing the Metadata 10-27
Preferences 10-28
General Preferences 10-29
Summary 10-31
Practice 10: Overview 10-32

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

ix

y
m

c
A

e
d
a

11 Using BI Publisher Enterprise


Objectives 11-2
Viewing a Report 11-3
Selecting Report Parameters 11-5
Selecting Parameters 11-6
Selecting a Layout 11-7
Selecting a Report Format 11-8
Exporting the Report 11-9
Sending the Report 11-10
Scheduling the Report 11-11
Managing Your Scheduled Reports 11-13
Using the Online Analyzer 11-14
Dragging the Page Item 11-15
Dragging the Row Field 11-16
Dragging the Column Field 11-17
Dragging the Data Item 11-18
Using the Analyzer for Excel 11-19
Analyzer for Excel Toolbar 11-21
Creating a New Folder 11-23
Creating a New Report: Process Overview 11-24
Creating a New Report 11-25
Editing the Report Properties 11-27
Defining the Data Model 11-28
Using the Query Builder 11-30
Query Builder: Process Overview 11-31
Creating a List of Values 11-32
Creating a Parameter 11-33
Creating and Uploading Your Layout 11-34
Creating a New Layout Template 11-35
Uploading the Template 11-36
Summary 11-37
Practice 11: Overview 11-38

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

12 Translating Reports
Objectives 12-2
Translation Options 12-3
Localized Template Option 12-4
XLIFF File Option 12-5
Structure of the XLIFF File 12-6
Updating the XLIFF File 12-7

e
l
c

a
r
O

y
m

c
A

e
d
a

Naming Standards 12-8


Locale Selection Logic 12-9
Translating Templates in BI Publisher Desktop 12-10
Report File Translations 12-11
Translating Your Report Description in BI Enterprise 12-12
Saving the XLIFF File 12-13
Uploading the XLIFF 12-14
Summary 12-15
13 Building a Data Template
Objectives 13-2
Data Templates 13-3
Data Extraction Engine 13-4
What Functionality Is Supported? 13-5
Supported Functionality 13-6
Report Migration 13-7
Data Template Definition 13-8
Data Template Structure 13-10
Data Template Declaration 13-11
Defining Parameters 13-12
Defining Queries 13-14
Data Query 13-15
Example: Data Query 13-17
Defining a Data Link Between Queries 13-18
Linking Queries 13-19
Example: Link Query 13-20
Data Triggers 13-22
Using Data Triggers 13-23
Data Structure Section 13-24
Data Structure 13-25
Easy and Quick to Build 13-26
Summary 13-27
Practice 13: Overview 13-28

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

y
m

e
d
a

c
A

14 Integration with Oracle Business Intelligence Enterprise Edition


Objectives 14-2
Oracle Business Intelligence Enterprise Edition 14-3
BI Presentation Services and Web Clients 14-4
BI Server 14-5
BI Administration Tool 14-6
Creating a BI Publisher Report from an Answers Request 14-7
Creating an Answers Request 14-8

e
l
c

a
r
O

xi

Displaying Request Results 14-9


Publishing the Request in Dashboard 14-10
Connection to BI EE from BI Publisher 14-11
Creating a Report 14-12
Specifying the Data Set for the Report 14-13
Creating a New Layout 14-14
Viewing the Final Report from Answers Request 14-15
Viewing the Report in BI EE Dashboard 14-16
Creating a Report from BI Server 14-17
Creating the Query 14-18
Using the Query Builder 14-19
Viewing the Final Report from BI Server 14-21
Summary 14-22
Viewlet Demonstrations 14-23
15 The E-Business Suite Development Process
Objectives 15-2
User Interfaces 15-3
Development Process Overview 15-4
Step 1: Identifying a Report 15-5
Associating a Program with a Request Group 15-6
Using Custom Programs in Oracle Applications 15-7
The Concurrent Program Definition 15-8
Copy the Concurrent Definition 15-9
Modify the Definition to Produce XML 15-10
Identify the Request Group 15-11
Query the Request Group and Add the New Report 15-12
Step 2: Submit the New Request 15-13
View the New Request 15-14
View the Request Output 15-15
Step 3: Create an RTF Template 15-16
Step 4: Register the Data Definition 15-17
Step 5: Register the Template 15-19
Update the Mapping 15-21
Complete the Template Registration 15-22
Set the Default Template 15-23
Submit the BI Publisher Request 15-24
View the Results 15-25
Summary 15-26

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

16 Modifying an Existing Report


Objectives 16-2
Process Overview 16-3

xii

y
m

c
A

e
d
a

Step 1: Identify the Report 16-4


Step 2: Identify the Data Definition 16-6
Step 3: Query the Template 16-7
View the Template Details 16-8
Step 4: Open the Downloaded Template 16-9
Step 5: Template Modification Overview 16-10
Upload the Modified Template 16-11
Confirm the Template Upload 16-13
Step 7: Submit the New Request 16-14
Summary 16-15
17 Building a Data Template in the E-Business Suite
Objectives 17-2
What is a Data Template? 17-3
Data Extraction Engine 17-4
What Functionality is Supported? 17-5
Report Migration 17-6
Data Template Definition 17-7
Data Template Flexfield Support 17-8
Four KFF-related Lexicals 17-10
oracle.apps.fnd.flex.kff.segments_metadata 17-11
oracle.apps.fnd.?ex.kff.select 17-13
oracle.apps.fnd.?ex.kff.where 17-15
oracle.apps.fnd.?ex.kff.order_by 17-17
How to Call a Data Template from the Concurrent Manager 17-19
Summary 17-22

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

18 Advanced E-Business Suite Concepts


Objectives 18-2
Standard GL Reports with BI Publisher 18-3
Sample: XML Output File 18-4
Placeholders for Standard Report Templates 18-5
Example: Account Analysis Report Placeholders 18-6
Example: Report Template Layout 18-7
Financial Statement Generator Reports 18-8
High-Level Overview of Publishing FSG Reports 18-9
Publish an FSG Report from the Run Reports Form in One Step 18-10
Publish FSG Report Two Steps 18-11
Publish FSG Report from Run Financial Reports 18-12
FSG: Basic Template Layout 18-14
Example: FSG: Basic Template Placeholders 18-15
Specialized Fonts 18-16
Using Specialized Fonts 18-17
E-Business Suite Fonts 18-18

e
l
c

a
r
O

xiii

y
m

Create Font File 18-20


Create Font Mapping Set 18-21
Create Font Mapping 18-23
Predefined Fonts 18-25
Dynamic Images 18-26
Report Bursting 18-27
Distributed Delivery 18-28
Bursting Mechanism 18-29
Delivery XML Structure 18-30
Parameter Mapping 18-31
E-Business Suite Bursting 18-32
E-Business Suite Document Delivery 18-33
Migrating Oracle Reports to XML Publisher 18-35
Migration Pre-requisites 18-36
Step 1: RDF to XML 18-37
Step 2: Data Model Migration 18-38
Step 3: Layout Migration 18-40
Known Migration Issues 18-42
Batch Conversion 18-43
Summary 18-44
19 Administration in 11i E-Business Suite
Objectives 19-2
XML Publisher Administrator: Administration Options 19-3
Administration Options: Configuration Tab 19-4
Configuration Tab: General Properties 19-5
Configuration Tab: PDF Output Properties 19-6
Configuration Tab: PDF Security Properties 19-7
Configuration Tab: RTF Output Properties 19-9
Configuration Tab: HTML Output Properties 19-10
Configuration Tab: FO Processing Properties 19-12
Configuration Tab: RTF Template Properties 19-14
Configuration Tab: PDF Template Properties 19-16
Configuration Tab: XLIFF Extraction Properties 19-17
Administration Options: Currencies Tab 19-19
Create Currency Format Set 19-20
Moving Templates and Data Definitions 19-22
Using FNDLOAD to Manage Metadata 19-23
Downloading Metadata 19-24
XDOLoader 19-27
XDOLoader Download Example 19-28
XDOLoader Upload Example 19-30
Summary 19-33

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

xiv

y
m

c
A

e
d
a

20 E-Business Suite Development Standards


Objectives 20-2
Database Objects 20-3
Schemas 20-4
Product Schemas 20-5
APPS Schema 20-6
Additional Schemas 20-7
Overall Guidelines 20-8
Document Definitions 20-9
General Guidelines 20-10
Report Size and Orientation 20-11
Report Body Format: Table Usage 20-13
Report Body: Fonts and Format 20-15
Report Body Format: Simplification 20-16
Report Body: Column Ordering 20-18
Report Body: Miscellaneous 20-20
Boilerplate and Data 20-21
Translation Standards 20-24
Examples: Translation Standards 20-25
Consistent Field Labels and Widths 20-27
Indicating Ranges 20-29
Charts and Hyperlinks 20-30
Report Format: Combination Formats 20-31
Layouts with Multiple Data Sets 20-32
Report Format: Layout 20-33
Report Format: Headers 20-34
Report Format: Parameters 20-35
Report Format: General Data Formatting 20-36
Report Format: Currency Formatting 20-38
Report Format: Report and Group Totals 20-40
Report Format: Date Formatting 20-41
Additional Resources 20-42

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

A Oracle XML Publisher Additional Template Standards


B Appendix B FSG Fundamentals
Standard Reports and Listings B-2
When to Use Standard Reports B-3
Financial Statement Generator Features B-4
When to Use FSG Reports B-5
Preparing Your FSG Report B-6
Building Basic Reports B-7
Financial Statement Generator B-8
Steps for FSG Financial Reports B-10
Defining Row Sets B-11

e
l
c

a
r
O

xv

y
m

c
A

e
d
a

Assigning Accounts B-13


Defining Calculations in Row Sets B-15
Reviewing Your Row Set Definitions B-16
Defining Ad Hoc Reports B-17
Defining Column Sets B-18
Applying Column Set Relative Headings B-20
Standard Column Sets B-21
Reviewing Your Column Set Definitions B-22
Row Set and Column Overrides B-23
Defining and Requesting Financial Reports B-24
Handling Rounding Problems B-25
Specifying Control Values B-26
Defining Content Sets B-27
Selecting Display Options B-28
Reviewing Your Content Set Definitions B-30
Defining Row Orders B-31
Ranking Methods B-32
Order by RankingDisplay Description B-33
Order by DescriptionDisplay Description B-34
Order by ValueDisplay Value B-35
Order by ValueDisplay Description B-36
Reviewing Your Row Order Detail Listing Report B-37
Copying Reports and Components B-38
FSG Report Prerequisites B-39
Enabling FSG Security B-40
Run FSG Reports from Standard Request Submission B-41
Running Financial Report Sets B-42
FSG Tips and Techniques B-43
Setting FSG Options for General Ledger B-45

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

C Integration with Oracle BI Enterprise Edition


Objectives C-2
Business Intelligence Enterprise Edition C-3
BI Presentation Services and Web Clients C-4
BI Server C-5
BI Administration Tool C-6
Creating BI Publisher Report from Answers Request C-7
Creating Answers Request C-8
Displaying Request Results C-9
Publishing the Request in Dashboard C-10
Connection to BI EE from BI Publisher C-11
Creating a Report C-12
Specifying the Data Set for the Report C-13
Creating a New Layout C-14

e
l
c

a
r
O

xvi

y
m

c
A

e
d
a

Viewing Final Report from Answers Request C-15


Viewing the Report in BI EE Dashboard C-16
Creating a Report from BI Server C-17
Creating the Query C-18
Using the Query Builder C-19
Viewing the Final Report from BI Server C-21
Summary C-22
BI Publisher Practices

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

xvii

c
A

y
m

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Introduction to
Oracle BI Publisher

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Course Objectives

After completing this course, you should be able to do the


following:
Explain the basic concepts and uses of Oracle BI
Publisher
Describe the underlying X standards
Create and use a rich text format (RTF) template
Understand the use of a portable document format
(PDF) template
Set up, configure, and use the Oracle BI Publisher
Enterprise

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 2

Objectives

After completing this lesson, you should be able to do the


following:
Understand the course agenda
Describe the Oracle XML technology stack
Describe the uses of Oracle BI Publisher
Explain the limitations of classic tools
Describe the advantages of Oracle BI Publisher
Describe the basic structure of Oracle BI Publisher

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Objectives
This introductory lesson discusses the course goals and daily agenda of the topics to be covered.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 3

Name Changes

Current Name
Oracle BI Publisher
Oracle BI Publisher Desktop
Oracle BI Publisher Enterprise

Old Name
XML Publisher
Template Builder
XML Publisher Stand-alone

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 4

Course Agenda: Day 1

1.
2.
3.
4.

Introduction to Oracle BI Publisher


Feature and Architecture Overview
Introduction to XML Standards
Installing Oracle BI Publisher Desktop

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 5

Course Agenda: Day 2

5.
6.
7.
8.

Introduction to Oracle BI Publisher Desktop


Creating RTF Templates
Advanced RTF Template Techniques
Other Templates

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 6

Course Agenda: Day 3

9.
10.
11.
12.
13.
14.

Installing Oracle BI Publisher Enterprise


Oracle BI Publisher Enterprise Administration
Using BI Publisher Enterprise
Translating Reports
Building a Data Template
Integration with Oracle BI Enterprise Edition

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 7

What Can Oracle BI Publisher Do?

Financial reports
Business reports
Invoices
Purchase orders
Sales orders
Contracts
Government forms
Tax forms
Marketing materials
XML
EFT and EDI (eText documents)
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

y
m

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 8

Example: Financial Reports

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 9

Example: Business Reports

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 10

Example: Invoices

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 11

Example: Purchase Orders

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 12

Example: Sales Orders

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 13

Example: Contracts

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 14

Example: Government Forms

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 15

Example: Tax Forms

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 16

Example: Marketing Materials

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 17

Example: XML

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 18

Example: EDI/EFT

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 19

Why Use Oracle BI Publisher?

Reduces complexity
Reduces time to develop, test, and deploy
Reduces total cost, including maintenance
Increases developer productivity
Enables flexible customization
Follows Oracle development standards
Enables ease of use

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 20

Document Management Requirements

Rich formatted reports


Partner reports
Financial statements
Government forms
Marketing materials
Contracts
Checks
Labels
XML
EFT and EDI
Multiple destinations
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Document Management Requirements


Many customers today have very strong business requirements in the reporting area.
High fidelity reports: Reports rich in images, charts, multiple fonts and color are a very
desirable feature for reports when they are to be distributed within and outside the company.
Partner reports: Invoices, purchase orders, and checks require rich content and are
currently highly customized
Financial statements: Your financial statements need to be presented to shareholders and
upper management in a high-fidelity format; your accounts would rather see them in
Microsoft Excel.
Government forms: Many government agencies now demand that you interact with them
in a specific format (for example, tax forms).
Marketing materials: Marketing materials generated by companies require rich
personalized content.
Contracts: Interacting with your customers and suppliers often requires written contracts
that need to be presented in a high-fidelity format.
Checks: The checks that you send to employees and suppliers require a specific format (and
even ink) so that their banks are able to process them.
Labels: Companies that make products need to label them (often including a barcode).
XML: B2B interaction requires XML as the format. This may require a transformation
from one XML format to another.
EFT and EDI: Electronic File Transfer (EFT) and Electronic Data Interchange (EDI) are
formats used to communicate with your banks and partners
Multiple destinations: All of these documents then need to be delivered to a report
consumer (via e-mail, fax, or printer).

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 21

Meeting Business Requirements

Oracle BI Publisher has the capability to perform the


following tasks in all the formats of your business
requirements:
Author reports
Manage reports
Deliver reports

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Meeting Business Requirements


BI Publisher meets your business needs directly out of the box. You can rapidly deploy it into
your own environments.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

BI Publisher reduces your total cost of ownership and increases the return on your investment.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 22

Classic Reporting Tool Issues

High development cost


High customization cost
Difficult upgrade
Data logic

Layout

Translation

Report
file

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Classic Reporting Tool Issues


Classic reporting approaches combine the data definition, the layout format, and the translation
in a single source. This leads to large numbers of report files; a single data definition (query) can
support several layouts. But, due to the nature of the Report Definition File, the user must create
and maintain a separate report for each combination. Now add the required translation, and the
number of report definitions becomes extremely large.
The tools used to create these reports are typically powerful but complex and require a high level
of technical training to be used effectively.
If a company takes a development-delivered report and must customize it, the only option is to
take a copy of that report definition, make the required changes, and then use it. If development
upgrades the base report, any changes must be propagated through to the customized report.
These three factors lead to an increase in maintenance and customization costs and an extremely
difficult and complex upgrade.
In Oracle E-Business Suite prior to Oracle BI Publisher, reporting was accomplished using
Oracle Reports. The definitions used by Oracle Reports are kept in Report Definition Files
(RDFs).

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 23

Classic Reporting Tool Issues

More requirements: Must have the same geometry, font,


margin size, and so on

Report output

Report files

More resources
Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Using Classic Reporting Tools


If the developer wants to supply more reports, then more resources are required.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

y
m

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 24

Classic Reporting Tool Issues

Requirements updates

Font-size change
Add another field
Margin change

Reflect all changes

Report output

Report files

Unending maintenance
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 25

Classic Reporting Tool Issues

1 data set : 10 layouts : 30 languages >> 300 reports


Requires highly skilled engineers for customization

E-Business Suite contains


approximately 90,000 RDF files.
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 26

Oracle BI Publisher: Advantages

Separate data, layout, and UI translation


Flexibility
Reduced maintenance

Rapid deployment
Business consultants use familiar desktop tools for
layout customization.

Support for multiple data sources

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Oracle BI Publisher: Advantages


BI Publisher breaks the three components apart and treats them separately at design time. At run
time, the three are brought back together by BI Publisher to generate the final formatted,
translated output. There is an immediate gain because this model is far more flexible; that is,
a single data definition can support multiple layouts, and multiple translations can be applied at
run time to generate translated output. This leads to a reduction in maintenance costs for all
concerned.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 27

Oracle BI Publisher Advantages:


One Template, Multiple Sources
RTF templates are converted to XSL-FO and then
formatted to multiple outputs.

PDF

HTML

XML data
BI Publisher

EXCEL

y
m

RTF

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Oracle BI Publisher Advantages: One Template, Multiple Sources


A single RTF template can be used to generate multiple output formats using XML Publisher.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 28

Oracle BI Publisher Advantages:


Batch Processing, XML APIs
Data, layout, and
destination in one
XML file

BI Publisher

EDI

HTML

PDF

PDF

Templates

y
m

XML

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Oracle BI Publisher Advantages: Batch Processing, XML APIs


BI Publisher has the ability to publish multiple times using the same data source. For instance, a
company can generate its payment data in a single data extraction program. From that program,
the following can be generated:
Electronic Funds Transfer (EFT): To communicate to banks to make payments to
suppliers
Excel: Accountants and controllers can enter payment data into Excel for further analysis.
HTML: Payment data can be published to a company portal via HTML.
PDF: Government reporting requires the PDF format for communication.
XML: For B2B communication, XML is quickly becoming the de facto standard.
With the use of different layout templates, BI Publisher simplifies the reporting architecture for
customers.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 29

E-Business Suite Uses Oracle BI Publisher

HRMS
DBI/PMV
Purchasing
Contracts
Sourcing
Quoting
FSG
eRecords
Loans
Financial
Consolidation Hub
AP/AR/FA

Order Management
iStore
Project Contracts
Marketing
Student Services
Discrete Mfg
Process Mfg
Bill Presentment
Internal Controls Mgr
Global Financials
SCM
Projects, and others

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 30

Before We Start: Additional Resources

More Help
http://Metalink.oracle.com > eTechnical
Reference Guides
http://Technet.oracle.com

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Additional Resources
The MetaLink site contains the following:
Patches and information on system problems.
User guides
For EBS only: Electronic technical reference guides that contain your ERDs, table
definitions, and view definitions
The TechNet site contains general information on upgrading, product information, and links to
Oracle shows and presentations.
In addition, TechNet contains a link to the BI Publisher Blog and the BI Publisher Forum.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 31

Summary

In this lesson, you should have learned how to:


Understand the course agenda
Describe the Oracle XML technology stack
Describe the uses of Oracle BI Publisher
Explain the limitations of classic tools
Describe the advantages of Oracle BI Publisher
Describe the basic structure of Oracle BI Publisher

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 1 - 32

Feature and Architecture Overview

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives

After completing this lesson, you should be able to


describe the following elements of Oracle BI Publisher:
Components
Architecture
Technology

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 2

Oracle BI Publisher

Oracle BI Publisher is a Java-based product that is


available with both Oracle BI Server and the technology
stack of Oracle E-Business Suite. It provides users with:
A template-based, easy-to-use publishing solution
A tool to rapidly develop and maintain report formats

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Oracle BI Publisher
Oracle BI Publisher is a new Java-based product that is available with both Oracle BI Server and
the technology stack of Oracle E-Business Suite. It is an easy-to-use, template-based publishing
solution that enables customers to rapidly develop and maintain report formats. It is built on
standard, well-known technologies such as XML and enables customers to take advantage of
familiar tools such as Microsoft Word and Adobe Acrobat.
Oracle BI Publisher consists of:
A library of APIs
An integrated architecture with Oracle E-Business Suite
A reporting tool providing rich output options
A friendly solution that provides control of the report design layout to the customer to
decrease the overall costs associated with customization and maintenance

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 3

Classic Reporting Paradigm

Data logic

Layout

Translation

Report
file
High development cost
High customization cost
Difficult upgrade

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Classic Reporting Paradigm


The classic approach to reporting is to combine all of the elements of a report into a single entity
that includes the data definition, the layout and the translation. This report file is very unwieldy
and causes problems due to its inflexibility. For example, if a report is required that has even a
minor layout change, a new report file must be created to support the new requirement even
though the data definition is exactly the same. If another version of a report is required at run
time in a different language, a new report file must be created to support the new language.
This approach leads to more time and expense in maintaining report files.
Classic tools include such products as Oracle Reports.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 4

Oracle BI Publisher Paradigm

Separate data, layout, and UI translation


Flexibility
Reduced maintenance
Data logic

Layout

Report
output

Oracle BI Publisher

y
m

Translation

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Oracle BI Publisher Paradigm


Although it might appear that splitting the report into data, layout, and translation components is
more complex, the tools and techniques actually simplify the process.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

BI Publisher breaks the three components apart and treats them separately at design time; at run
time, the three are brought back together by BI Publisher to generate the final formatted and
translated output.
There is an immediate gain because this model is far more flexible. That is, a single data
definition can support multiple layouts, and multiple translations can be applied at run time to
generate translated output. This leads to a reduction in maintenance costs for all concerned.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 5

Ease of Use

Developers and business consultants use familiar


desktop tools for layout customization.
Support for multiple data sources

Report templates

Formatting
engine
Multiple
data sources

Report output

Rapid deployment
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 6

Extract Once, Publish Many Times

EFT

EFT
Banking
Excel

XML data
BI Publisher

Controller

HTML
CEO
PDF
Government

Different templates
for different output formats

y
m

XML

e
d
a

B2B
Copyright 2007, Oracle. All rights reserved.

c
A

Extract Once, Publish Multiple Times


BI Publisher has the ability to publish multiple times using the same data source. For instance, a
company can generate its payment data in a single data extraction program. From that program,
the following can be generated:
Electronic Funds Transfer (EFT): To communicate to banks to make payments to
suppliers
Excel: Accountants and controllers can enter payment data into Excel for further analysis.
HTML: Payment data can be published to a company portal via HTML.
PDF: Government reporting requires the PDF format for communication.
XML: For B2B communication, XML is quickly becoming the de facto standard.
With the use of different layout templates, BI Publisher simplifies the reporting architecture for
customers.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 7

Batch Processing

PDF
E-mail
RTF
PeopleSoft,
SAP, Siebel

Printer

HTML

BI Publisher

Excel

Fax

XML

E-commerce

Templates

Multiple
data
sources

Web Services

EDI

Word XML Spy


Excel JDeveloper
Acrobat Scriptura

EFT

Layout tools

Output

Copyright 2007, Oracle. All rights reserved.

WebDAV

y
m

Destinations

e
d
a

c
A

Batch Processing
BI Publisher has the ability to process batch jobs of data from extraction to delivery. A single
file format can describe the data, the template, and the destination of individual jobs. This
information is passed to the BI Publisher batch processor, and documents are generated and
delivered.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 8

Report Bursting
Multiple data sources and
a distribution plan
in one XML file

EDI
HTML

PDF

Oracle BI Publisher

PDF
XML

y
m

Templates

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 9

Distributed Delivery
Master delivery manager can dispatch the
delivery requests to remote delivery servers
via IPP and Web Services.
Supported
Protocols
IPP, HTTP,
SMTP, WebDAV,
FTP, AS2

Printer

Email

WebDAV

Linux/NT
Server

Printer

Printer

Oracle BI Publisher
Delivery Manager
Firewall

Printer

Linux/NT
Server

y
m

Fax

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 10

Inbound Document Capture


EFT

EFT
Banking

Excel

BI Publisher

Controller

MSWord
Supplier

Application data
PDF
Government

Inbound documents converted to


XML and fed back to database
Copyright 2007, Oracle. All rights reserved.

e
l
c

y
m

XML

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

B2B

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 11

Government Forms
Business data
Human Resources
Procurement

Oracle BI Publisher

PDF
Government

Human Resources
W2, W4
1099

Procurement
sf26, sf33, sf1449
OF347

Government

Download PDF forms from the government Web site.


Send back the exact form filled with data.
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 12

BI Publisher Multitier Architecture

Client

Middle tier

Browser
Oracle BI Publisher
Desktop
MS Word
Adobe Acrobat

Oracle BI Publisher
Enterprise
BI Server

Copyright 2007, Oracle. All rights reserved.

Database

Oracle XML DB
E-Business Suite

y
m

e
d
a

c
A

BI Publisher Multitier Architecture


Client software
JAVA-enabled browser
Oracle BI Publisher desktop
MS Word
Adobe Acrobat
Middle-tier software
Report management provided by Oracle BI Publisher Enterprise
Analytic integration provided by Oracle BI Server
Database software
Stand-alone: Oracle Database 10g with the Oracle XML DB features installed and enabled
Embedded: Oracle E-Business Suite 11.5.10 CU2 or later instance

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 13

Oracle BI Publisher Desktop


Functional users tools:
Functional users can create reports
using familiar desktop applications.
Oracle BI Publisher for Word
Oracle BI Publisher for Excel
Oracle BI Publisher for PDF
Consultants or IT departments tools:
Consultants create data sources and
reports using expert tools.
Oracle BI Publisher Builder
Oracle BI Publisher Viewer or
Debugger
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 14

Oracle BI Publisher Layout Templates

Industry-standard templates
Desktop applications:

PD

Adobe Acrobat
MS Word
MS Excel
XSL editors

Oracle BI Publisher Desktop


Template Builder add-ins

XL

F
T
R

L
S
X

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Oracle BI Publisher Layout Templates


Users can design layout templates using familiar desktop applications such as Adobe Acrobat
and MS Word. In addition, there are now many XSL editors available on the market for the user
to take advantage of.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 15

Oracle BI Publisher Enterprise


Oracle BI Publisher Embedded: custom development

Powerful formatting engines

High-performance data extraction engine

Batch processing and bursting

Delivery API for e-mail, fax, printing, FTP, and AS2

Based on open standards: Java, XML, XSL, FO, RTF, PDF


Oracle BI Publisher Enterprise

Easy and fast deployment

Any J2EE container

Configure repository on XML DB or file system

Data from multiple databases in the same report


(Oracle, DB2, and others)

Multiple output formats and multiple delivery options

Document repository, scheduling, archiving

Database and application server independent

Advanced security and administrative options

Pluggable services, Web service APIs

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 16

Oracle BI Publisher Process Architecture


PDF

Word

XSL

XML
Template Manager

Template
XSL
Data
Handler

Data

XML

Various
formats
Delivery
Server

Document
XLIFF

Translation
Translation
Catalogs

Translation Handler

Copyright 2007, Oracle. All rights reserved.

y
m

Destination

e
d
a

c
A

Oracle BI Publisher Process Architecture


Oracle BI Publisher is made up of the five modules:
Data Handler: Data engines are registered with the Data Handler. Can be any XML source
or any engine that generates XML (such as Oracle Reports).
Template Manager: The Template Manager is a friendly user interface that is built over a
collection of APIs that enables customers to register and maintain their data definitions and
templates. Layout templates to be used for the final output are stored and managed in the
Template Manager. Templates are created using familiar desktop tools such as MS Word,
MS Excel, and Adobe Acrobat.
Document Processor: The Document Processor allows the user to build a single document
from multiple data source and template combinations, or to create individual documents for
each combination. Passing XML that contains multiple data sources and templates to Oracle
BI Publisher results in the generation of multiple output documents.
Translation Handler: The Translation Handler provides users with the ability to register
and maintain data definitions and templates in a friendly user interface. Increases ease and
flexibility of maintaining everyday reports and business documents. (This will be supported
in a future release.)
Delivery Server: Takes the output document and delivers it to the printer

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 17

Oracle BI Publisher Process Architecture (continued)


XML Report Publisher
Oracle BI Publisher offers a new concurrent program, XML Report Publisher, that applies
a user-selected template layout to generated XML data.
XML Report Publisher is accessible at the Concurrent Manager and can be executed on the
Single Request Submission screen or the familiar Concurrent Manager Request Submission
screen.
Provides the flexibility of choosing a layout template from a list of registered templates
associated with the selected XML-generated data source
User is able to apply multiple layout templates to the same XML data without having to run
the XML generating program more than once
The output is a viewable PDF document. The prerequisite is to register the data definition and
template. There are four parameters in the report: XML data, Template, Language, and
Currency.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 18

Data Sources

Oracle,
SQL Server, DB2

Any database or multiple databases


Distributed queries
Oracle BI Publisher Data Engine

PeopleSoft,
SAP, Siebel

Any ERP system


Any XML data server

Java, C++,
Pearl, etc

Oracle Reports
DB packages in SQL or XML

Any XML Web service


Web Services

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 19

Oracle BI Publisher Data Engine

Fast, scalable extraction engine


Integrated into concurrent manager
Migration tools available from Oracle Reports
Offers all that Oracle Reports offers (30% to 40% faster)

Multiple queries and joins


Event triggers
Flexfield support
Formula/Summary columns
Java API layer for Oracle Applications Framework (OAF)
support
Data bursting (5.6.1)
Distributed queries (5.6.1)

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 20

Oracle BI Publisher Underlying Technology

Open-standard technologies:
W3C XSL:FO implementation
Pure Java
Pluggable data in XML
Output formats in PDF, PS, RTF, and HTML
Support for Internet Printing Protocol, WebDAV,
Internet Fax Protocol, and SMTP

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Oracle BI Publisher Underlying Technology


The underlying technology is based on an implementation of the W3C XSL-FO standard.
BI Publisher also provides improved performance, added security, and extensions to the FO
standard to support more complex reporting requirements.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 21

Performance and Scalability

Stream-based implementation:
Reduces memory footprint
Handles large XML input files
Is the fastest XSL-FO implementation

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Performance and Scalability


The XSL-FO engine is not only robust but also fast. This is vital, because XML data by its
nature generates large objects and files, and these can cause serious memory issues during
processing. BI Publisher has a stream-based implementation that reduces this memory footprint,
thereby enabling large XML input files to be processed.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 22

Security

Printing from MS Excel is not accepted by financial


auditors.
PDF security levels for:

Read-only text
Editable text
Copyable text
Printable text
Password protecting text

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 23

Internationalization and Language Support

No need for expensive language-specific printers


Full set of Unicode fonts supplied with BI Publisher
Scalable fonts embedding, with CID mapping tables
Oracle BI Publisher supports:

CJK
BiDi
Unicode
MLS

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Language Support
In todays global economy, the support for languages is paramount. BI Publisher ships with a
full set of Unicode fonts, and a font-mapping and sub-setting engine has been built. As the
output is created, the engine picks the font glyphs required for the languages used. These are
then embedded inside the document as a new font, ensuring that the final output contains the
required fonts and no specific fonts are required on the printer.
BI Publisher is unique in supporting:
CJK
BiDi
Unicode
MLS
BI Publisher is thus superior to other PDF engines in these areas.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 24

Translation

Communicate with partners around the world


No dependency on installed languages
No dependency on database character set

Create a template for any language or territory


Translate template or send to third party
Support for XLIFF

Recognizes any combination of:


185 language codes
244 territory codes

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Translation
BI Publisher enables users to create templates in 160 languages in 200 territories. There is no
dependency on the database character set. Customers can either use XLIFF technology to have
their templates translated, or provide translators with the whole template. This is a great
advantage, enabling translators to translate templates in context.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 25

Output Formats

Oracle BI Publisher supports the following formats:


Rich text format (RTF)
Portable document format (PDF)
eText (used with Electronic Data Interchange [EDI] or
Electronic Funds Transfer [EFT])

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Output Formats
RTF is a standard maintained by Microsoft. You can learn more about it at:
http://msdn.microsoft.com/library/?url=/library/en-us/dnrtfspec/html/rtfspec.asp
PDF was created by Adobe. You can learn more about it at:
http://www.adobe.com/products/acrobat/adobepdf.html
The PDF Specification is available at:
http://partners.adobe.com/public/developer/pdf/index_reference.html

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

PDF standards in multiple output format (for example, print-based PDFs and electronic PDFs),
are currently being submitted and accepted as standards to the ISO (International Standards
Organization). You can find details about their published standards at:
http://www.iso.org/
XML, XSL, XSL-FO, and XPath are standards maintained by the World Wide Web Consortium
(W3C). You can find them at:
http://www.w3c.org/

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 26

Flexible Deployment Options


For PeopleSoft

For E-Business Suite

Embedded

Enterprise

For JD Edwards

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 27

Oracle BI Publisher for Applications


Oracle BI Publisher for Oracle E-Business Suite

Integrated with concurrent manager

Tightly integrated with all E-Business Suite modules

Central repository for managing data and layout

Translation and configuration management


Oracle BI Publisher for PeopleSoft Enterprise

Integrated with process scheduler and report manager

Publish PeopleSoft queries and row sets

Report bursting

Security join tables

Template manager with effective dates support


Oracle BI Publisher for JD Edwards Enterprise

Integrated with Enterprise One queries

Support queries saved through data browser

Row and business unit security

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 28

Summary

In this lesson, you should have learned how to describe


the following elements of Oracle BI Publisher:
Components
Architecture
Technology

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Summary
Oracle BI Publisher enables the following user communities to be more productive.
End users: The end user is presented with rich report offerings, including multiple formats
with multiple delivery options.
Business consultants: Traditionally, the business consultant gathers business requirements,
describes the report that is required in a document, and passes this to the IT consultant for
implementation. The business consultant now has a set of familiar desktop applications that
can be used to design the report format itself, ensuring that the report meets all the business
requirements that are in scope and that it looks exactly as the consultant designed it.
IT consultants: The IT consultant now receives a document that is the actual report format
as designed by the business consultant. The time to develop, deploy, and test is greatly
reduced; the cost of ongoing maintenance is also reduced.
Developers: The developer is able to focus on generating XML data to satisfy multiple
requirements. Now that development is free from the one data definition produces one
report layout paradigm, there is a move toward generating larger data engines that can
satisfy a larger requirement set. This provides end users with far greater choice and control
over the content of the reports they want to see.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 2 - 29

y
m

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Introduction to XML Standards

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to do
the following:
Describe XML, XSL, and other X Standards objects
List the components of an XML document
Create a well-formed XML document
Describe XML namespaces
Describe a DTD
Describe XML Schema
Describe XML Path Language (XPath)
Describe XSL and XSL Transformations (XSLT)

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 2

Extensible Markup Language


Extensible Markup Language (XML) describes data
objects called XML documents that are composed of
markup and data.

XML processors

Web data

Markup and data

XML document

Copyright 2007, Oracle. All rights reserved.

Custom tags

y
m

e
d
a

c
A

Extensible Markup Language


XML describes data objects called XML documents that:
Are composed of markup language for structuring the document data
Support custom tags for data definition, transmission, validation, and interpretation
Have become a standard way to describe data on the Web
Are processed by XML processors
XML was developed by an XML working group headed by the World Wide Web
Consortium (W3C) with the following design goals:
XML is usable over the Internet.
It supports a wide variety of applications.
It is compatible with Standard Generalized Markup Language (SGML).
XML can be processed using easy-to-write programs.
It has a minimum number of optional features.
XML is human-legible and reasonably clear.
XML enables quick design preparation.
It enables formal and concise design.
The XML documents are easy to create.
The XML documents can be verbose.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 3

Advantages of Using XML


XML enables:
A simple and extensible way to describe data
The ability to interchange data
Simplified business-to-business communication
Writing of smart agents
The ability to perform smart searches
A sample XML document:
<?xml version="1.0 encoding=UTF-8"?>
<books>
<title>Building Oracle XML Applications</title>
<title>Oracle XML Handbook</title>
<title>Beginning XML Second Edition</title>
</books>
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Advantages of Using XML


XMLs strongest point is its ability to perform data interchange. Because different groups of
people rarely standardize on a single set of tools, it takes a significant amount of work for
two groups to communicate. XML makes it easy to send structured data across the Web so
that nothing gets lost in translation.
When using XML, you can receive XML-tagged data from yours or another system. Neither
of the users has to know how the other users system is organized. If another partner or
supplier teams up with your organization, you do not have to write code to exchange data
with their system. You simply require them to follow the document rules defined in the
DTD. You can also transform those documents using XSLT.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

When writing an agent, one of the challenges is to make sense of incoming data. A good
agent interprets information intelligently, and then responds to it accordingly. If the data
sent to an agent is structured with XML, it is much easier for the agent to understand exactly
what the data means and how it relates to other pieces of data it may already know.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 4

XML Standards
Defines and
validates

2
Document type
definition

Defines and
validates

XML schema
Locates /Catalog/Item
nodes

Uniquely identifies
elements

XPath

Used by

1
XML language
http://www.hr.com/catalog
3 XML namespace

Applies

Transformed
to

Processed
by

6
XSL/XSLT
stylesheet

Output
document

XML processor (DOM and SAX API)


Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Standards
The following XML standards are covered in this chapter:
1. The XML language specification defines the rules that govern XML document
structure, and how XML processors must read them.
2. A document type definition (DTD) provides the definition and relationships of
elements contained in an XML document. A DTD validates an XML document.
3. XML namespaces provide a mechanism to distinguish elements with the same name
but different definitions used in the same XML document.
4. The XML Path Language (XPath) provides syntax for searching an XML Document.
XPath expressions are used in an XSL stylesheet to match specific nodes.
5. An XML Schema provides a way to describe the XML document structure using data
type definitions and uses namespace support. XML Schema is the preferred way to
validate XML documents.
6. Extensible Style Sheet Language (XSL) is implemented by XSL Transformations
(XSLT) to specify how to transform an XML document into another document. XSLT
uses an XML vocabulary for transforming or formatting XML documents.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 5

Oracle XML Support


Oracle products provide support for XML in:
Development tools

Middle-tier frameworks

Database storage

Oracle XDK 10g


Oracle BI Publisher

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Oracle XML Support


Development tools and frameworks: Oracle XML Database (XDB), Oracle JDeveloper
10g, Oracle Internet File System (iFS), Oracle Application Development Framework (ADF)
in JDeveloper, Oracle Portal, Oracle Application Server Reports Services, and Oracle
Dynamic Services can be used to build XML applications.
Database and middle-tier frameworks: Oracle Application Server 10g provides the
environment for the XSQL Pages framework, J2EE services which support XML
applications, and Web Services.
Database storage: In Oracle Database 10g, the Oracle XDB enables XML documents to be
stored in and retrieved from relational tables, XMLType columns, and character large object
(CLOB) types. Oracle Text (interMedia Text) can be used to efficiently search XML
documents stored in XMLType or CLOB columns.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Oracle XML Developers Kit (XDK) 10g: Oracle XDK 10g is available in Oracle
JDeveloper 10g, Oracle Application Server 10g, and Oracle Database 10g. Oracle XDK
provides the following components, tools and utilities:
XML Parsers, XSLT Processors, XSLT VM, XML Schema processors
XML Java Beans, XML Class Generator, XSQL Servlet, XML SQL Utility (XSU)
XML Pipeline Processor, TransX Utility

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 6

Example: A Simple XML Page

<?xml version="1.0"?>
<employees>
<employee>
<employee_id>120</employee_id>
<last_name>Weiss</last_name>
<salary>8000</salary>
</employee>
<employee>
<employee_id>121</employee_id>
<last_name>Fripp</last_name>
<salary>8200</salary>
</employee>
</employees>

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Example: A Simple XML Page


The example of a simple XML document uses nested elements to describe the employee
data. Elements are identified by tag names, such as employee, employee_id, and
last_name. Tag names are distinguishable as markup, rather than data, because they are
surrounded by angle brackets (< and >).
Note: In XML, an element includes the start tag (<employees>), end tag
(</employees>), and all the markup and character data contained between the tags.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 7

XML Document Structure


An XML document contains the following parts:
Prologue
Root element
Epilogue
<?xml version="1.0" encoding="WINDOWS-1252"?>
<!- this is a comment -->
<employees>
...
</employees>

2
3

<?gifPlayer size="100,300" ?>

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Document Structure


An XML document contains the following parts:
The prologue, which may contain the following information:
- XML declaration (optional in XML 1.0, mandatory in XML 1.1)
- Document type definition (DTD), which is required only to validate the
document structure
- Processing instructions and comments, which are optional
The root element, which is also called the document element
An epilogue, which contains processing instructions and comments
An XML document can also contain processing instructions, giving commands or
information to an application that is processing the XML data.
Processing instructions have the format <?target instructions?>, where the target is
the name of the application that is expected to do the processing, and the instructions consist
of a string of characters that embodies the information or commands for the application to
process.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 8

XML Declaration
XML documents must start with an XML declaration.
The XML declaration:
Looks like a processing instruction with the xml
name, as in the following example:
<?xml version="1.0" encoding="WINDOWS-1252"?>
<document-root>
...
</document-root>

Must contain the version attribute

May include the following optional elements:


encoding attribute
standalone attribute

Is optional in XML 1.0 but mandatory in XML 1.1


Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

The XML Declaration


It is generally recommended that you start an XML document with an XML declaration. If it
is present, it must be the first line in the document. Although the XML declaration looks like
a processing instruction, it is really a simple declaration. In the XML 1.0 recommendation,
an XML document does not require the XML declaration. However in the XML 1.1
specifications, the XML declaration is mandatory.
Note: Not all tools and XML Parsers support XML 1.1 syntax.
The only attribute that is required in the declaration is the version. Additional attributes
that can be added to the XML declaration include:
The encoding attribute, which is optional. By default, XML documents are encoded
in UTF-8 format of the Unicode character set. The slide example uses an encoding of
WINDOWS-1252. This is useful for applications (such as those written in Java) that
can handle other encoding formats.
The standalone attribute is optional and may be set to the yes or no value. If
omitted, the value is assumed to be no. Set the standalone value to:
- no if an application requires an external DTD to determine proper document
structure
- yes when the document does not have DTD, does not change the document
content, or if the DTD is internal

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 9

Components of an XML Document


XML documents comprise storage units containing:
Parsed data, including the:
Markup (elements, attributes, entities) used to
describe the data they contain
Character data described by markup
<?xml version="1.0" encoding="WINDOWS-1252"?>
<employees>
<employee id="100">
<name>Rachael O&apos;Leary</name>
</employee>
</employees>

Unparsed data, textual or binary information


(graphic and sound data) taken as entered
<![CDATA[

...unparsed data... ]]>


Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Components of an XML Document


An XML document comprises storage units containing parsed or unparsed data. Parsed data
is textual information comprising:
Markup that describes the data it contains. Markup includes:
- Elements to describe the data it contains, such as the root element (employees)
and its child elements (employee, name)
- Attributes, which are name and value pairs (id="100") included in the start tag
of an element
- The entities (&apos;) representing any character data substituted in place of
their appearance
Character data described by the markup components. For example:
- The value 100 assigned to the id attribute
- The data Rachael O'Leary described by the <name> element
- The &apos; entity, which represents the apostrophe (') character
Note: The element tree in an XML document defines its layout and logical structure.
Unparsed data, embedded in CDATA sections can be used in an XML document to contain
textual data or encoded binary data, such as graphic and sound files. A CDATA section starts
with <![CDATA[ and ends with ]]> characters. The information contained inside the
CDATA section is not parsed by an XML Parser, and is taken as entered.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 10

XML Elements

An XML element:
Has a start tag, end tag, and optional data content
Has tag names that are case sensitive
Tag name

<employee>
Element

Start tag

<name>Steven King</name>

</employee>

Data
content

End tag
Tag name

Empty elements:
Do not contain any data
May appear as a single tag

<initials></initials>
<initials/>

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Elements
An XML element has:
A start tag (for example, <employee>) includes:
- The <character
- A case-sensitive tag name (employee), without leading spaces
- The >character
An end tag (for example, </employee> is:
- The < character
- The case-sensitive tag name that must be identical to the start tag name, but
prefixed with a slash. Leading spaces are not permitted.
- The > character
Data content that can also contain elements, such as <name> in the slide example

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

In summary, an XML element includes the start tag, end tag, and everything in between.
Empty elements have no content between the start and end tags. In this case, a shortened
form can be used where the start tag name is followed by a slash. For example:
<initials/>.

a
r
O

Tag names are a descriptive term for an XML element and its contentfor example,
employee. The tag name is known as the element type name.
11i Oracle XML Publisher Fundamentals (NAMER) 3 - 11

Markup Rules for Elements

There is one root element, sometimes called the


top-level or document element.
All elements:
Must have matching start and end tags, or be a selfclosing tag (an empty element)
Can contain nested elements, so that their tags do
not overlap
Have case-sensitive tag names subject to naming
conventions: start with a letter, no spaces, and do
not start with the letters xml
May contain white space (spaces, tabs, new lines,
and combinations of them) that is considered part
of the element data content
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Markup Rules for Elements


Every XML document must contain one root element (top-level or document element).
XML documents are hierarchical in structure with elements nested in others forming a
document tree. The start and end tags for elements must not overlap, as in this example:

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

<employee>
<first_name>Steven<last_name>king</first_name></last_name>
</employee>

Here, the <last_name> element overlaps the <first_name> element. This is not
permissible. The correct form is:
<employee>
<first_name>Steven</first_name><last_name>king</last_name>
</employee>

Element start and end tag names must be identical; that is, they are case sensitive. For
example, <Employee>, <employee>, and <EMPLOYEE> are all different tag names.
Element tag names must start with a letter or an underscore (_), but not numeric or
punctuation characters. After the first letter, numeric, dash (-), and period (.) characters are
allowed, but not white space. Tag names cannot start with the xml letter sequence, or any
case-sensitive combination thereof. White space, including new lines, are considered part of
the data. However, XML Parsers treat end-of-line characters as a single line-feed.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 12

XML Attributes
An XML attribute is a name-value pair that:
Is specified in the start tag, after the tag name
<?xml version="1.0" encoding="WINDOWS-1252"?>
<employees>
<employee id="100" name='Rachael O&apos;Leary'>
<salary>1000</salary>
</employee>
</employees>

Has a case-sensitive name


Has a case-sensitive value that must be enclosed
in matching single or double quotation marks
Provides additional information about the XML
document or XML elements
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Attributes
Attributes are simple name-value pairs that are associated with a particular element. XML
attributes must be specified after one of the following:
The start tag of an element
The tag name of an empty element
Example: <employee id="100" email="SKING"/>
Attribute names are case-sensitive and follow the naming rules that apply to element names.
In general, spaces are not used, but are allowed, on either side of the equal sign.
The attribute values must always be in matching quotes, either single or double quotation
marks. The slide example shows the employee id attribute value enclosed in double
quotation marks, and the name attribute value enclosed in single quotation marks. In the
latter case, the &apos; entity must be used to include an apostrophe in the name value.
Attributes provide additional information about the XML documents content or other XML
elements. Attributes can be used for the following purposes:
Describing how the XML document data is encoded or represented
Indicating where the links or external resources are located
Identifying and calling external processes, such as applets and servlets
Specifying an element instance in the document for facilitating a rapid search
Note: Attributes always have a value. For example, name="" has an empty string value.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 13

Using Elements Versus Attributes

<?xml version="1.0"?>
<employees>
<employee>
<id>100</id>
<last_name>King</last_name>
<salary>24000</salary>
</employee>
</employees>

Elements

<?xml version="1.0"?>
<employees>
<employee id="100" last_name="King"
salary="24000">
<job>President</job>
</employee>
</employees>

Attributes

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Using Elements Versus Attributes


In the slide, you see two examples. In Example 1, id, last_name, and salary are
defined as elements in the employee element, whose parent is the employees element.
In Example 2, id, last_name, and salary are attributes of the employee element,
whose root element is employees.
Elements and attributes accomplish approximately the same thing; that is, they describe the
data. The examples shown are both valid and communicate the same basic information
about an employee.
Note: In general, it is more robust and flexible to use elements rather than attributes.
The choice to use elements or attributes is often a matter of preference, but takes some time
and experience to determine the best style to use for different contexts. The easiest and the
most consistent approach is to use elements for data that the user of the document wants to
see, and attributes for metadata representing additional information about the data that the
the document may require. The following are additional points to consider:
Elements are more easily added as your requirements expand.
Elements may be ordered, but attributes are returned unordered from the document.
Elements can be structured and may contain other elements.
Attributes are atomic; that is, they cannot be nested or have attributes of their own.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 14

XML Entities
An XML entity:
Is a unit of data storage
Is identified by a case-sensitive name
Is used as replacement text (substituted) when
referencing its name between an ampersand (&)
and a semicolon (;)
<comment>Salaries must not be &lt; 1000</comment>

Has predefined names for special XML characters:

&lt; for less-than (<) and &gt; for greater-than (>)


&amp; for ampersand (&)
&quot; for double quotation mark (")
&apos; for single quotation mark (')
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Entities
An XML entity is a unit of data storage that:
Is identified by a case-sensitive name
Represents replacement text to eliminate a lot of typing in XML documents
Is referenced by its name prefixed with an ampersand (&) and terminated by a
semicolon (;). The ampersand is referred to as an escape character.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

The XML standard predefines entity names for the following special characters:
The less-than sign (<) represented by the name &lt;
The greater-than sign (>) represented by &gt;
The ampersand (&) represented by &amp;
The double quotation mark (") represented by &quot;
The single quote or apostrophe (') represented by &apos;
In the following example, the XML Parser expects a tag name after the less-than (<) sign:

e
l
c

a
r
O

<number>150<100</number>

This invalid syntax is corrected by using the &lt; built-in entity to represent the less-than
character. Example:
<number>150&lt;100</number>

Note: User-defined entity names can be declared in a document type definition (DTD).
11i Oracle XML Publisher Fundamentals (NAMER) 3 - 15

XML Comments
XML comments:
Start with <!- End with -->

May appear anywhere in the character data of a


document, and before the root element
Are not elements, and can occupy multiple lines
May not appear inside a tag or another comment

<?xml version="1.0" encoding="WINDOWS-1252"?>


<!- Comment: This document has information about
employees in the company -->
<employees>
<name>Steven King</name> <!-- Full name -->
</employees>
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Comments
Comments are a way to document what is done inside an XML document. XML comments
can appear anywhere in the XML document, except inside:
The start or end tag of an element. Thus, they are not permissible in attribute values.
Another comment. Comments cannot be nested.
Because comments are not considered to be an XML element, its appearance does not
violate the tree structure or one-root element requirement for well-formed XML documents.
The slide example shows a comment:
Before the root element
After the end tag of the </name> element

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Note: In general, a comment must not appear before the XML declaration. However, some
XML Parsers, as in Internet Explorer, do not mark it as an error.
Applications must not depend on comments because they are not intended for processing
purposes, but merely for making the XML document more meaningful to people reading its
contents.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 16

A Well-Formed XML Document


Every XML document must be well formed:
An XML document must have one root element.
An element must have matching start and end tag
names, unless they are empty elements.
Elements can be nested but cannot overlap.
All attribute values must be quoted.
Attribute names must be unique in the start tag of
an element.
Comments and processing instructions do not
appear inside tags.
The special characters < and & cannot appear in
the character data of an element or attribute value.
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

A Well-Formed XML Document


Every XML document must be well formed to guarantee that it is correctly structured and
adheres to the rules defined in the slide. The slide contains a list of the most common rules
to be addressed for well-formed documents, but it is not a complete list.
Note: The less-than (<) and ampersand (&) characters are special in XML and cannot appear
as themselves in the character data part of an element, or the value of an attribute. In
character data and attribute values, an XML Parser recognizes:
The less-than (<) sign as a character that introduces the start tag of another element
The ampersand (&) as an escape character before an entity name terminated by a
semicolon (;)

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Therefore, to include special characters in the character data of an element, or attribute


value, you must use built-in XML entity names for the special characters. For example, use
&lt; to include the less-than character, and &amp; for the ampersand character. The XML
Parser replaces the entity reference with its textual or binary representation, as discussed
earlier in this lesson.
Note: The XML 1.1 specification requires the XML declaration to appear at the beginning
of the document. However, the declaration is optional when using XML 1.0.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 17

Class Activity
Identify errors in the following examples:
<?xml version="1.0"?>
<Question>Is this legal?</Question>
<Answer>No</Answer>

<!-- An XML document -->


<?xml version="1.0"?>

<Question 4You="Is this attribute name correct"/> 3


<EMAIL ID=Mark.Ant@oracle.com></EMAIL>

<Question>Is this legal</question>

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Class Activity
1. Both <Question> and <Answer> are top-level elements. You can have only one
document element per document.
2. In general, you cannot have a comment before the XML declaration, and the root
element is required.
Note: Internet Explorer allows a comment before the XML declaration.
3. The attribute name cannot start with a digit.
4. The attribute value is not enclosed in quotation marks.
5. Opening and closing tag names are case sensitive and must match.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 18

Comparing XML and HTML

XML

Is a markup language for describing data


Contains user-defined markup elements
Is extensible
Is displayed as a document tree in a Web browser
Conforms to rules for a well-formed document

HTML
Is a markup language for formatting data in a Web
browser
Contains predefined markup tags
Is not extensible
Does not conform to well-formed document rules
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Comparing XML and HTML


The key difference between XML and HTML is that:
XML is a markup language for describing data
HTML is a markup language for formatting data
The slide covers other important differences between XML and HTML.
A Word About XHMTL
The World Wide Web Consortium (W3C) has worked on defining Extensible HyperText
Markup Language (XHTML) as a successor to HTML.
XHTML is designed to conform to XML standards and well-formed document rules, and
provide a way to reproduce, subset, and extend HTML documents. An XHTML document is
a particular XML document instance intended for processing by a Web browser.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Note: Not all browsers support XHTML documents, and different browsers often process
XHTML documents in different ways.

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 19

XML Development
Developing XML documents can be done using:
A simple text editor, such as Notepad
A specialized XML editor, such as XMLSpy
Oracle JDeveloper 10g XML-related features that
include:
Syntax checking for XML documents
XML Editor with code insight for XML schemadriven editing
Registering of external XML schemas
Validation of XML documents against registered
XML schemas

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Development and Oracle JDeveloper 10g


There are many ways to develop XML documentsfrom using a simple text editor, such as
Notepad, to rich XML development tools, such as XMLSpy or Oracle JDeveloper 10g.
Oracle JDeveloper 10g includes:
An XML Editor, which is a specialized XML schema-driven editor for editing XML
documents subject to XML language standards
A code insight feature that enables JDeveloper to provide you with a choice of
elements or attributes that are relevant to the context of the editing location in the
document
The capability to register external XML schemas for use by the schema-driven editor
The use of registered XML schemas to validate XML documents
A simple XML syntax check to test whether the document is well formed

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 20

XML Namespaces
An XML namespace:
Is identified by a case-sensitive Internationalized
Resource Identifier (IRI) reference (URL or URN)
Provides universally unique names for a collection
of names (elements and attributes)
<employee>
employee_id
<name>

<departments>
<name>
department_id

<salary>
http://hr.com/employees

<location_id>

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

urn:hr:departments

c
A

XML Namespaces
An XML namespace:
Is identified by Internationalized Resource Identifier (IRI), which is a case-sensitive
string of characters identifying a resource
Provides a universally unique name for a collection of XML names made of element
and attribute names
The IRI is a string of characters that can be formatted as:
A Uniform Resource Indicator (URI) or Uniform Resource Locator (URL), such as a
Web address http://hr.com/employees
Note: The URL, or Web address, represents a unique string and is not checked to
ensure a valid or existing Web address.
A Uniform Resource Name (URN), such as urn:hr:departments. A URN starts
with the letters urn, followed by a colon (:), a Namespace Identifier (NID) (hr), a
colon (:), and a Namespace Specific String (NSS) (departments).
The example in the slide shows two collections of XML element and attribute names, each
identified by a unique XML namespaces IRI. If the XML namespace was not used, then the
<name> element for an employee will be indistinguishable from the <name> element of
the department. Applying the XML namespace qualifies each <name> element removing
the ambiguity, particularly if the documents are merged.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 21

XML Namespaces (continued)


Why Use XML Namespaces?
XML namespaces are designed to provide universally unique names for elements and
attributes. XML namespaces:
Resolve name ambiguity and collision problems that can occur when XML document
fragments are combined, or when multiple elements have similar type and attribute
names in the same XML document
Allow code modules to be invoked for specific elements and attributes
If two companies are interchanging XML messages, they must come to a common
agreement on the meaning of the element and attribute names in the messages. This can be
achieved by two means:
Defining the meaning, format, and domain of every element and attribute needed
Recognizing element and attribute names without ambiguity
The first can be accomplished by using an XML Schema definition. The second is solved by
using XML namespaces to qualify element names.
The examples in the slide illustrate the combining of a <department> element with one
of its <employee> elements. Each document is different and defines a <name> element.
Each <name> element has a different content model and must be interpreted by an
application in a different way. The problem does not arise when the elements exist in
separate documents.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 22

XML Namespace Declarations: Example

<?xml version="1.0"?>
<department xmlns="urn:hr:department-ns"
xmlns:emp="urn:hr:employee-ns">
<name>Executive</name>
<emp:employee>
<emp:name>
<emp:first_name>Steven</emp:first_name>
<emp:last_name>King</emp:last_name>
</emp:name>
</emp:employee>
<emp:employee>
<emp:name>
<emp:first_name>Neena</emp:first_name>
<emp:last_name>Kochhar</emp:last_name>
</emp:name>
</emp:employee>
</department>
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Namespace Declarations: Example


The slide shows an example of a <department> element containing two <employee>
elements. The <department> element shows an example of declaring two XML
namespaces: a default and one with the emp prefix. The <name> element is used for:
The department name containing the Executives text
The employee name containing the <first_name> and <last_name> child
elements
Without using XML namespaces in the document, the <name> element will be ambiguous
to a processor and can possibly be treated as the same type, even though the department and
employee names are semantically and structurally different.
Using the XML namespaces removes the ambiguity for each <name> element, which
allows them to be processed differently by an XML application. In the example in the slide:
The unqualified <department> and <name> elements are implicitly qualified by
the default namespace, urn:hr:department-ns, declared in the start tag of the
<department> element
All <employee> elements and their children, including the <emp:name> element,
are explicitly qualified with the emp prefix, which is associated with the
urn:hr:employee-ns XML namespace

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 23

Why Validate an XML Document?

Well-formed documents satisfy XML syntax rules,


and not the business requirements about the
content and structure.
Business rules often require validation of the
content and structure of a document.
XML documents must satisfy structural
requirements imposed by the business model.
A valid XML document can be reliably processed
by XML applications.
Validations can be done by using a DTD or an
XML Schema.

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Why Validate an XML Document?


A well-formed XML document is one that meets all the rules of the XML specification.
What if just following the syntax rules is not quite good enough? Your business may require
the validation of the actual structure and content of a document. Your document must not
only follow the XML rules but also must satisfy structural requirements imposed by your
business model, as in the following example:
Each <employee> element must consist of <employee_id>, <first_name>,
<last_name>, <email>, <phone_number>, and <department_id> elements. If
an <employee> element misses any of these elements, it is considered to be not valid.
You may also need to verify whether these elements have a valid value.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

You can perform all these validations by using a document type definition (DTD). DTD was
the first type of mechanism available for validating XML document structure and content. It
lacked the capability of performing data type validations on the content. The XML Schema
recommendation supports validation for different data types, and is rapidly replacing DTD
as a way to validate the XML document structure and content.
Note: Theoretically, anything that has not been explicitly permitted in DTD is forbidden.
Some parsers do not always enforce the rules defined by a DTD.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 24

Document Type Definition


A document type definition (DTD):
Is the grammar for an XML document
Contains the definitions of:

Elements
Attributes
Entities
Notations

Contains specific instructions that the XML parser


interprets to check the document validity
May be stored in a separate file (external)
May be included in the document (internal)

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Document Type Definition


A DTD provides a list of elements contained in an XML document that collectively
specifies the structure of the document. A DTD defines the set of markup items used in an
XML document, that is, the:
Elements
Attributes, and their permissible values
Entities (user defined)
Notations
Note: Notations are not frequently used.
The XML engine interprets the markup defined in DTD to check the document for validity.
For example, a DTD may specify that a department must have exactly one department
identification number and one name, but may have multiple employee elements.
An XML document indicates to an XML Parser whether it is associated with a DTD and
where to locate the DTD.
A DTD may be found internally (inline) in the document, or externally identified by a
Uniform Resource Locator (URL), which can be a file on disk. If the XML Parser does not
encounter errors, then the XML document is guaranteed to be consistent with the definition.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 25

Simple DTD Declaration: Example


Example of a simple DTD with element declarations:
<!ELEMENT employees (employee)>
<!ELEMENT employee (name)>
<!ELEMENT name (#PCDATA)>

A valid XML document based on the DTD is:


<?xml version="1.0"?>
<employees>
<employee>
<name>Steven King</name>
</employee>
</employees>

y
m

Note: All child elements must be defined.


Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Simple DTD Declaration: Example


The DTD in the slide declares three elements: employees, employee, and name. These
elements form a simple hierarchy, where the <employees> element must contain one
<employee> element that must contain one <name> element (as shown in the slide).

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Note
The #PCDATA example represents text-only content without child elements.
The XML document does not reference the DTD in the slide example.
Element names used in the content model represent a single instance of that element. Using
the DTD in the slide, the following XML document will be invalid, because there are two
<employee> child elements:
<?xml version="1.0"?>
<employees>
<employee><name>Steven King</name></employee>
<employee><name>Ellen Abel</name></employee>
</employees>

e
l
c

a
r
O

Note: The DTD syntax for declaring an element provides a way to specify a cardinality
(a number of occurrences) for usage of elements in the content model.
11i Oracle XML Publisher Fundamentals (NAMER) 3 - 26

Example of a Simple DTD Declaration (continued)


Validating XML Against a DTD
The oraxml utility is a command-line interface to the Oracle XML Parser supplied with
the Oracle XML Developers Kit (XDK). The oraxml command-line utility can be used to
validate an XML document against a DTD using the following syntax:
java oracle.xml.parser.v2.oraxml dtd emp.xml

The dtd option specifies that the supplied XML document (emp.xml) must be validated
against the DTD specified in the <!DOCTYPE> declaration contained in the XML file.
To run the oraxml command-line utility, ensure that the xmlparserv2.jar is added to
the Java CLASSPATH, as in the following example:
set CLASSPATH=E:\JDeveloper\lib\xmlparserv2.jar
java oracle.xml.parser.v2.oraxml dtd emp.xml

Oracle JDeveloper can be utilized as an external tool which enables the execution of the
oraxml utility with any XML document in a project.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 27

XML Schema
XML Schema:
Is an XML language that defines and validates
the structure of XML documents
Is stored in an XML
Validates
XSD
Schema Document (XSD)
Defines components, such as:

Simple types definitions


Complex type definitions
Element declarations
Attribute declarations

References
Instance

Supports XML namespaces and built-in, simple,


and complex data types
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Schema
The W3C XML Schema Definition Language is an XML language (or vocabulary) used in
an XML Schema Document (XSD) for describing and constraining the content of XML
documents. The XSD is used to validate the structure of an XML document.
An XML document, whose structure is based on the definitions in an XML Schema, is
called an instance document of that XML Schema. The slide shows an XML Schema
Document stored separately from the XML instance document that it describes and
validates.
The introduction of the XML Schema allowed XML technology to represent data types in a
standard format. The data types give a precise way of specifying the type of content that can
be held in elements and attributes of an XML document. Using a document type definition
(DTD) provides no mechanism for specifying data types in a way that a database user may
require. The XML Schema definition file builds upon DTD functionality while providing
XML namespace and data type support.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 28

XML Schema (continued)


Benefits of XML Schemas
You can use XML Schema to specify the structure of XML documents and validate the
XML documents. Although most XML documents are well formed, they may not be valid.
A valid document is well formed and conforms to specific rules defined by either a DTD or
an XML Schema. The benefits of using an XML Schema for validation are the following:
Easily created using XML, as defined by the W3C XML Schema language.
Support the W3C Namespace Recommendation.
Can be used to validate content of text elements based on built-in and user-defined
data types.
Allow the creation of complex data type models that can be reused.
Support object inheritance and substitution in types.
In the Web publishing world, a single page that displays local weather, stock quotes,
horoscopes, and specific news channels based on user preferences can involve dozens of
queries made to underlying databases and application servers. These queries are made via
SQL, the standard object-relational query language, or via some programmatic interface that
ultimately calls SQL. Because both SQL and programming languages (such as Java) are
strongly typed, they return information that possesses type, structure, constraints,
relationships, and so on. The structural and data typing aspects of XML Schema can help
exploit generation of viewable documents from databases.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 29

XML Schema Document: Example

The simple XML Schema uses:


A required XML namespace string, with an xs
prefix, http://www.w3.org/2001/XMLSchema
The <schema> element as its document root
The <element> element to declare an element
<?xml version="1.0"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="departments" type="xs:string"/>
</xs:schema>

A valid XML instance document:


<?xml version="1.0"?>
<!-- The element cannot contain child elements -->
<departments>
Finance
</departments>
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Schema Document: Example


The example in the slide shows a simple XML Schema document that declares a single
element called departments. The XML Schema Document (XSD) uses the required
XML namespace value http://www.w3.org/2001/XMLSchema, which is assigned the xsd
namespace prefix. The xsd prefix is used to qualify the schema, element, and string
names to ensure that the XSD document structure conforms with the W3C XML Schema
language recommendation; that is, the XSD itself is a valid document.
The XML Schema language elements used in the example are the following:
The <xs:schema> element is the root element for the XSD, and contains the
definitions for the structure of the XML instance document.
The <xs:element> element declares a root element name, departments, for the
XML instance document, an example of which is shown below the XSD code.
The <xs:string> value is set as the data type for the contents of the
departments element in the XML instance document. In this case, the data can be
any string but not markup; that is, no child elements are permitted.
Note: Using a namespace prefix, such as xs or xsd, is recommended but not required.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 30

XML Schema Versus DTD

XML Schema:

Is more powerful and flexible than a DTD


Provides better namespace support than a DTD
Is written in XML syntax
Is extensible
Provides data-type support

DTD:
Provides ENTITY functionality that is not supported
by XML Schema
Can be embedded in an XML document
Is written in SGML

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Schema Versus DTD


An XML Schema defines a set of new names (called a vocabulary) and the structure and
data types for elements, types, attributes, and attribute groups. A DTD defines a vocabulary
of names for elements and attributes containing either a text string, or a combination of text
strings and child elements.
Applications that process the same XML documents may want to represent their data
elements differently. Using XML namespaces help applications to distinguish between
different definitions of the same element name used in different contexts in a single
document. XML Schema seamlessly supports namespaces to distinguish definitions. A DTD
does not directly support namespaces or provide support for data-typing. Because a DTD
declares names associated with textual contents, it poses problems when you try to model
dynamic content that comes from strongly typed systems such as databases. XML Schema is
ideal for database systems because it provides for data type integrity and the maintenance of
bound conditions.
A DTD is written using a syntax that is different from an XML document. Consequently,
parsers, tools, and programs dealing with a DTD must implement the specific rules that
govern the DTD. An XML Schema allows models to be written using the XML syntax,
which allows the same programs that read the data to also read the definition of the data.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 31

XML Path Language


XML Path Language (XPath):
Is primarily used to address the nodes of an XML
document modeled as a tree of nodes
Is named after its use of a path notation for
navigating through the hierarchical structure of an
XML document
Uses a compact, non-XML syntax to form
expressions for use in Uniform Resource Identifier
(URI) and XML attribute values
Fully supports XML namespaces
Is designed to be used by XML applications, such
as XSLT and XPointer
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XML Path Language


XML Path Language (XPath) is primarily used for addressing parts (nodes) of an XML
document. XPath models an XML document as a tree of nodes, and expresses a navigation
path through the hierarchical structure of an XML document. XPath:
Is named after the path notation it uses for navigating through the structure of an XML
document
Uses a compact, non-XML syntax to form expressions that are used in URI and XML
attribute values
Facilitates the manipulation of string, number, and Boolean values
Operates on the abstract, logical structure of an XML document called the document
data model, rather than its surface syntax
In addition to its use for addressing parts of an XML document, XPath fully supports XML
namespaces and provides a natural expression language subset for pattern matching, which
is extensively used in the W3C XSLT Recommendation, and XPointer.
Note: XSLT is Extensible Stylesheet Language Transformation, the language used to
transform an XML document into another XML document. XPointer is the XML Pointer
Language, used as a fragment identifier for any URI reference that locates a resource with a
MIME type of text/xml or application/xml.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 32

XPath Model

Document root

<departments>

<department>

num="1"

<department_id>
10
3

<department_name>
Administration

<department>

y
m

num="2"

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

XPath Model
XPath models an XML document as a tree of nodes. The graphic in the slide depicts the
different types of nodes, as seen by XPath, in an XML document:
1. Document root, which is a virtual document root that is the parent of the entire XML
document containing the XML declaration, the root element and its children,
comments, and processing instructions at the beginning and the end of the document
2. Root element (for example, the <departments> element)
3. Element nodes (for example, the <department>, <department_id>, and
<department_name> elements. The root element is also an element node.
4. Attribute nodes (for example, the num="1" node)
5. Text nodes (for example, the nodes containing the text 10 and Administration)
Note: In the XPath model, the document root is not the same as the root element node.
XPath can also address comment nodes, processing instruction nodes, and namespace nodes,
which have not been shown in the diagram. XPath defines a way to compute a string value
for each type of node, some of which have names. Because XPath fully supports the XML
Namespaces Recommendation, the node name is modeled as a pair known as the expanded
name, which consists of a local part, and a namespace URL, which may be null.
XPath allows various kinds of expressions to be nested with full generality. XPath is a
strongly typed language; this means that the operands of various expressions, operators, and
functions must conform to designated types. XPath is a case-sensitive expression language.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 33

XSLT and XPath


XSLT:
Transforms XML into plain text, HTML, or XML
Specifies transformation rules in elements with
attributes that use XPath expressions
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="//department_name">
<html>
<body>
<p><xsl:value-of select="."/></p>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="*/text()"/>
</xsl:stylesheet>
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XSLT and XPath


An Extensible Stylesheet Language (XSL) document is an XML document with elements
that define transformation rules. The slide shows sample XSL document elements:
The <xsl:template> element with a match attribute containing an XPath
expression defining the set of nodes to which the template rule applies
The <xsl:value-of> element with the select attribute containing an XPath
expression. The <xsl:value-of> element outputs the text value of the specified
node, relative to the context node matching its template XPath expression.
The <xsl:template> element informs the XSLT Processor how to locate specific
element nodes in the input document, and provides the rules to create the output data as the
contents specified between the start and end tags of the <xsl:template> element. In the
example, you search for department_name elements, and use the current node (.) to
output the value of the department_name.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Note: The XSLT Specification states that XSLT processors must provide a default template
rule causing text nodes to be output, if no matching template rules exist. Suppress the output
of unprocessed text nodes by including, at the end of the XSLT stylesheet, a template rule
matching all text nodes that does not output data. For example, as shown in the slide, you
would use <xsl:template match="*/text()"/>.

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 34

XSL
Extensible Stylesheet Language (XSL) is made up of
two parts:
XSL Transformations (XSLT)
XSL Formatting Objects (XSL-FO)

XSL

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

XSL
XML documents have structure and, unlike HTML, do not provide formatting or display
instructions. Extensible Stylesheet Language (XSL) adds the capability of transforming an
XML document into another document containing XML with a different structure, or an
HTML document with formatting tags.
XSL has the following two parts:
XSL Transformations (XSLT) is an XML application that processes rules contained in
an XSLT stylesheet. The rules in an XSLT stylesheet can be applied to any XML
document.
XSL Formatting Objects (XSL-FO) is an XML application used for describing the
precise layout of text on a page. XSLT is used to generate XSL-FO elements that are
output to another XML document. Additional processing is needed to create the final
output form such as a portable document format (PDF) document.
The graphic in the slide depicts an XML document and an XSLT stylesheet document being
processed by an XSL processor. The XSL processor is an XML application that applies the
transformation rules to the XML document as specified in the XSL document and produces
a new document as the result.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 35

XSLT

Input XML
document

XSL
processor

Output XML
document

XSL
Stylesheet
<?xml version="1.0"?>
<xsl:stylesheet ...>
<xsl:template match="XPath"/>
<!-- output information -->
Matching
</xsl:template>
rule
</xsl:stylesheet>
Copyright 2007, Oracle. All rights reserved.

Output
data

y
m

e
d
a

c
A

XSLT
Extensible Stylesheet Language Transformations (XSLT) is an XML application, or XSL
Processor, that processes rules specifying how to transform one XML document into another
XML document. The rules are contained in an XSLT document called an XSLT stylesheet,
which itself is an XML document and must be well formed.
The slide shows that an XSLT stylesheet contains one or more template rules; each template
rule has two parts:
A match pattern, specified as an XPath expression in an attribute of an
<xsl:template> element
Template data, appearing between the start and end tags of the <xsl:template>
element, that contains the output information. The template data typically contains
XML/HTML elements mixed with the XSLT rules.
The XSL processor compares the elements in the input XML document with the template
rule pattern in the XSLT stylesheet, and writes the template data for matching rules to the
output tree, typically, another XML document. Essentially, the transformation process
operates on the tree data structure of a source (input) XML document and produces a tree of
nodes as its output.
Note: XSL-FO elements are output elements found inside the <xsl:template> rules.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 36

XSLT Stylesheet
An XSLT stylesheet is an XML document containing:
A <xsl:stylesheet> root element declaring:
The xsl namespace prefix
The http://www.w3.org/1999/XSL/Transform
mandatory namespace URI

One or more <xsl:template> elements and other


XSL elements defining transformation rules
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
...
<xsl:template match="/"> ... </xsl:template>
<xsl:template match="..."> ... </xsl:template>
<xsl:stylesheet>
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

XSLT Stylesheet
An XSLT stylesheet is an XML document that uses elements from the XSLT vocabulary to
describe transformation rules. The document element of every XSLT stylesheet is the
<xsl:stylesheet> element, whose content is a set of one or more XSL elements
defining template rules describing the transformation to be performed.
Note: <xsl:transform> is a synonym for <xsl:stylesheet>.
The <xsl:stylesheet> element declares the mandatory namespace attribute
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" used to qualify the
elements in an XSLT stylesheet. If you do not provide this exact namespace prefix and URI,
the XSLT Processor simply ignores the rules in <xsl:template>, <xsl:for-each>,
<xsl:value-of>, and other XSL elements that are qualified with the xsl prefix.
Therefore, it does not recognize them as XSLT instructions.
Each stylesheet rule, called a template, contains a match pattern specified as an XPath
expression that is compared against the nodes in the source XML document. An XSL
template rule is represented by an <xsl:template> element with a match attribute that
is assigned a "pattern" string containing an XPath expression.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 37

XSLT Stylesheet: Example


<?xml version="1.0"?>
<xsl:stylesheet version ="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table border="1">
<tr><th>Id</th><th>Name</th><th>Salary</th></tr>
<xsl:apply-templates/>
</table>
5
</body>
4
</html>
</xsl:template>
<xsl:template match="employee">
<tr>
<td><xsl:value-of select="employee_id"/></td>
<td><xsl:value-of select="last_name"/></td>
<td><xsl:value-of select="salary"/></td>
</tr>
6
</xsl:template>
</xsl:stylesheet>
Copyright 2007, Oracle. All rights reserved.

1
2
3

y
m

e
d
a

c
A

XSLT Stylesheet: Example


The XSLT document in the example, called a stylesheet, shows the following components:
1. The standard XML document declaration, because the stylesheet is an XML document
2. Mandatory XML namespace declaration using the xsl namespace prefix, and the URI
http://www.w3.org/1999/XSL/Transform namespace
3. The <xsl:template> rule matching the root of the source XML document
4. The template data containing HTML tags to be written to the output document
5. The <xsl:apply-templates> element instructing the XSLT Processor to apply
template rules, if any, for child elements of root in the source document. The
<xsl:apply-templates> element is replaced by any output generated for
matching child element template rules.
6. The <xsl:template> rule for matching <employee> elements in the source
document, with template data containing HTML table row (<tr>...</tr>) tags
enclosing three table data (<td>...</td>) tag pairs. Each table data tag pair
encloses an <xsl:value-of select="..."/> rule that inserts the value of the
source document element selected by the XPath expression, which is typically the
name of the source document element.
The XML document that uses this XSLT stylesheet is shown in the slide titled Viewing the
Transformed Document.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 38

Viewing the Transformed Document


Perform one of the following actions:
Open the XML document in the browser.
View the oraxsl command-line processor output.
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="emp.xsl"?>
<employees>
<employee>
<employee_id>100</employee_id>
<last_name>King</last_name>
<salary>24000</salary>
</employee>
<employee>
<employee_id>101</employee_id>
<last_name>Kochhar</last_name>
<salary>18000</salary>
</employee>
</employees>
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Viewing the Transformed Document


The slide shows the source XML document and the result of applying the XSLT stylesheet
from the slide titled XSLT Stylesheet: Example. When you open the XML document with
Microsoft Internet Explorer, it automatically applies the XSLT stylesheet specified in the
XML document processing instruction and renders the result shown.
Alternatively, you can use the oraxsl command-line interface to apply an XSLT
stylesheet to an XML document. To invoke oraxsl, use the following:
set CLASSPATH=E:\JDeveloper\lib\xmlparserv2.jar
java oracle.xml.parser.v2.oraxsl f.xml f.xsl f.html

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

The oraxsl parameters (in order) are:


1. The source XML document (f.xml)
2. The XSLT stylesheet document (f.xsl)
3. The output file name (f.html). If omitted, the output appears in the standard output.

e
l
c

a
r
O

Note: If the result file contains HTML, you can view it in a browser. The Oracle 10g version
of the oraxsl utility is configured as an External Tool in JDeveloper because it supports
some XSLT 2.0 features.

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 39

Viewing the Transformed Document (continued)


Using an XSLT Stylesheet with an XML Document
An XSLT stylesheet is applied to an XML document by adding the xml-stylesheet
processing instruction in the XML document prologue that is before the document root
element. The xml-stylesheet processing instruction provides two pseudoattributes:
The type value is the MIME media type for the type of stylesheet. For XSL
stylesheets, the type value must either be application/xml or text/xml.
However, the XSL processor in Internet Explorer does not recognize
application/xml as the type value but accepts a value of text/xsl, as shown
in the example in the slide. A MIME media type value of text/css is applicable to
a Cascading Style Sheet (CSS).
The href value is a URI string referencing the name of the stylesheet document.
The xml-stylesheet processing instruction is required for a browser to invoke its
XSLT Processor to apply the stylesheet to the XML document tree.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 40

Summary
In this lesson, you should have learned how to:
Describe XML, XSL, and other X Standards objects
List the components of an XML document
Create a well-formed XML document
Describe XML namespaces
Describe a DTD
Describe XML Schema
Describe XML Path Language (XPath)
Describe XSL and XSLT

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 41

Practice 3: Overview
This practice covers the following topics:
Creating an employee XML file
Adding an employee element to the XML file
Adding employee data to the XML file
Creating a department XML file
Adding a department element to the XML file
Adding department data to the XML file
Creating an XML file to combine employee and
department

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 3 - 42

Installing Oracle BI Publisher Desktop

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to
install Oracle BI Publisher Desktop.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 2

Obtaining Oracle BI Publisher Desktop


The current version of Oracle BI Publisher Desktop is
available on Oracle Technology Network (OTN) at:
http://www.oracle.com/technology/software/products/p
ublishing/index.html
From this site, download Oracle XML Publisher
Desktop 5.6.2 for Microsoft Windows. To use Oracle BI
Publisher Desktop, you must meet the following
requirements:
Microsoft Windows 2000 or later
Microsoft Word 2000 or later
Java Runtime Environment (JRE) 1.4 or later

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 3

Obtaining Oracle BI Publisher Desktop


for Oracle E-Business Suite
The current version of Oracle BI Publisher Desktop is
available on MetaLink in patch 5027437:
http://updates.oracle.com/download/5027437.html
Always check MetaLink to be sure that you obtain the
most current version. Versions are likely to change.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 4

Installing Oracle BI Publisher Desktop


To install Oracle BI Publisher Desktop, perform the
following basic steps:
Download the patch.
Unzip the patch.
Run setup.exe, which is included with the patch.

Follow the onscreen instructions.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 5

Downloading and Unzipping the Patch

Download Oracle BI Publisher Desktop from OTN


or MetaLink.
The patch will download as:
XMLP_Desktop.zip (OTN)
p5027437_11i_MSWIN.zip (MetaLink)

Unzip the patch into the directory of your choice.


It creates a directory named:
XMLP_Desktop (OTN)
XMLP_Desktop_R562 (MetaLink)

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 6

Running the Installer

Change to the directory created when you


unzipped your patch.
Run the installer setup.exe.

Follow the onscreen directions.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 7

Choosing Setup Language

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 8

Welcome Screen

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 9

Designating a JRE Location

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 10

Word Tutorial Option

y
m

Copyright 2007, Oracle. All rights reserved.

Word Tutorial Option


Make sure that the check box is not selected.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 11

Designating a Destination Location

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 12

Ready to Install

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 13

Installing

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 14

Installation Finished

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 15

Summary
In this lesson, you should have learned how to install
Oracle BI Publisher Desktop.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 16

Practice 4: Overview
In this practice, you install Oracle BI Publisher
Desktop.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 4 - 17

y
m

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Introduction to
Oracle BI Publisher Desktop

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to
create and use a basic RTF template for Oracle BI
Publisher using Oracle BI Publisher Desktop.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Objectives
It is worth noting that Oracle BI Publisher Desktop used to be named Template Builder.
For this course, you should consider the two terms to be synonymous.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 2

Oracle BI Publisher Desktop


Oracle BI Publisher Desktop is an extension to
Microsoft Word (2000 or later) that simplifies rich text
format (RTF) creation. Oracle BI Publisher Desktop
enables you to perform the following functions:
Insert data fields
Insert data-driven tables
Insert data-driven forms
Insert data-driven charts
Preview your template with sample XML data
Browse and update the content of form fields
Extract boilerplate text into an XLIFF translation
file and test translations
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Oracle BI Publisher Desktop


All of these steps, and many others, can be performed manually. Oracle BI Publisher
Desktop simplifies the common tasks associated with creating an Oracle BI Publisher RTF
template.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 3

Viewing the BI Publisher Desktop Add-In

Open Microsoft Word.


If Oracle BI Publisher Desktop was properly
installed, you should see:
The Template Builder option on the main menu
Template Builder submenu options

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Viewing the BI Publisher Desktop Add-In


All Template Builder features may be accessed from the main menu using Template
Builder, or from Template builder submenu options that are displayed by default below the
MS Word toolbar.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 4

Walk-Through Sample
You often have a starting template from which to
begin. For example, look at the following template:
Balance Letter Start.rtf

y
m

Copyright 2007, Oracle. All rights reserved.

Walk-Through Sample
The default location for student sample files is:

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

D:\Program Files\Oracle\XML Publisher Desktop\samples

From that directory, there are three subdirectories:


eText templates
PDF templates
RTF templates
The files used in this demonstration and its associated lab are kept in the RTF templates
subdirectory. Specifically, the files are in the following location:
D:\Program Files\Oracle\XML Publisher Desktop\samples\RTF
templates\Balance Letter\

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 5

Basic Template

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Basic Template
Nothing about this template is unique to Oracle BI Publisher. You could just have easily
started from a blank document. You just saved some typing.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 6

Loading the Sample XML Data

In the Data menu, select Load XML Data.


You are going to load Balance.xml.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Loading the Sample XML Data


Data Menu
The data menu allows you to select the data source for the template. The data source defines
the XML format that will be merged with the RTF template. You must load a data source to
use most of the template builder functionality.
Note: All submenu options can also be accessed from the Template Builder option on the
main menu.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

The Data menu includes the following options:


Load XML Data
This function allows you to load a sample XML file that contains all fields that you
want to insert into your template as a data source.
Load XML Schema
This function allows you to load an XML Schema file (.xsd) that contains the fields
available in your report XML data. The XML schema has the advantage of being
complete (a sample xml may not contain all the fields from the data source). For the
preview, the Template Builder can generate dummy sample data for an XML Schema.
However, the preview works better if you also upload real sample data.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 7

Loading the Sample XML Data (continued)


Load Report
This function allows you to load an existing BI Publisher report file (.xdo). It will
then step you through the Report Wizard allowing you to modify the report.
Report Wizard
The report wizard allows you to enter a SQL query to create an BI Publisher report file
(.xdo) that can be uploaded into the BI Publisher Enterprise. The report file is used to
create sample xml data, an xml schema and generates a standard report layout.
Note: You must leave the template open as you load the XML data.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 8

Loading the Sample XML Data

y
m

Copyright 2007, Oracle. All rights reserved.

Loading the Sample XML Data (continued)


Open the Balance.xml file as your XML sample data.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 9

Loading Complete
If you successfully loaded the sample XML Data, you
see the following:

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 10

Inserting Fields

Position the cursor in the Word document where


you want to insert the address.
In the Insert menu, select Field.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Inserting Fields
The Insert Field feature allows you to select data elements defined in the data source (that is,
the XML file) and insert them into the template. In the Insert menu select Field to open
the insert element dialog box.
Note
Throughout the starting document, you will see several placeholders such as the
following: <INSERT ADDRESS HERE> You must remove these placeholders, and
replace them with the appropriate fields.
You will also have to adjust the position of the cursor, typically by pressing the Enter
key, when inserting fields. If you do not, all the fields will appear on the same line.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 11

Choosing the Address Fields

Select <CUSTOMER_NAME>,
and then click Insert.
In the same way, click Insert
after selecting the following:

<ADDRESS_LINE_1>
<ADDRESS_LINE_2>
<ADDRESS_LINE_3>
<ADDRESS_LINE_4>
<CITY>
<STATE>
<ZIP>

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Choosing the Address Fields


The Field dialog box shows the structure of the data source in a tree view.
To insert a field into the document, select a field that represents a single data field (a leaf
node of the tree) and click the Insert button. A text form field, with hidden BI Publisher
commands (in the help text of the form field), is inserted at the cursor position in the
template.
You may either select and insert an additional data fields or close the dialog box by clicking
the Close Button.
Note: You can also drag and drop the fields from this window into your template.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 12

Setting the Other Simple Fields


Using the Insert Field dialog box, set the other simple
fields on the RTF template as follows:
<AS_OF_DATE> for <INSERT AS OF DATE HERE>
<TRX_CURRENCY_CODE> for <INSERT
CURRENCY HERE>
<C_INV_OPEN_BALANCE> for <INSERT
CURRENCY BALANCE HERE>
Note: At this point, you should insert fields only for
unique data fields. You will handle the data table in the
next section.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 13

Previewing Progress
In the Preview menu, select your desired format.

y
m

Note: This example is RTF format.


Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Previewing Progress
Preview > Format Selection or Template Builder > Preview > Format Selection
Before previewing your work, be certain to perform a Save As instead of Save.
Your choice of Preview Formats are:
PDF to see the document in Acrobat Reader
HTML to see the document in your browser
RTF to see the document in Microsoft Word
EXCEL to see the document in Microsoft Excel

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 14

Setting Build Preferences


In the Tools menu, choose Options.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Build Preferences


Tools > Options or Template Builder > Tools > Options
The Build Options tab allows you to specify options that influence how the Template
Builder generates tables and forms.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 15

Build Options

Click the Build tab.


Select the desired form field option.

y
m

e
d
a

Click OK to finish.
Copyright 2007, Oracle. All rights reserved.

c
A

Build Options
The Build tab allows you to specify options that influence how the Template Builder
generates tables and forms.
For-each Form Field
You may choose how the Template Builder creates the form fields for processing
instructions in the Insert Table/Form dialog box.
The Descriptive option (for-each Invoice) renders a descriptive form field for the
processing instructions that makes the layout template easier to understand. However,
the longer fields may distract from the visual layout of the template.
The Abbreviated option (F) provides a one letter abbreviation for each instruction as
in the Template Builder 1.0 version.
If the Hidden font effect checkbox is checked, the instruction text is generated with the
hidden font effect of Microsoft Word. Hidden text is hidden in the Print Preview. You may
display or hide the hidden text by changing Hidden Text checkbox on the View tab of the
Microsoft Word Options dialog box.
Table Header Color
You may also choose the color of the table header columns for the generated tables in the
Insert Table/Form dialog box.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 16

Inserting a Table
Oracle BI Publisher Desktop offers a function that
generates a table for you.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Inserting a Table
On the Insert menu select Table/Form and then click on Advanced to open the Insert
Table/Form dialog box. The Insert Advanced Table/Form dialog box is the most flexible
tool of the template builder. It allows you to perform the following tasks:
Create a simple or nested table with a variable number of rows.
Associate a group of data elements, such as a complete invoice or a purchase order
line, with a form in the document that will be repeated for each occurrence of the data
element.
Select and define a layout for all the data fields in the template.
Group or re-group the data.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

The Insert Table/Form dialog box displays two tree view panes. The left pane shows the data
source structure, while the right pane shows the elements that have been selected.
Note: Oracle BI Publisher Desktop generates the table using the Build Options settings that
you specified previously. The following demonstration uses Descriptive instructions.
Demonstration: The document should include a table of all invoices that are not or only
partially paid. To open the Table/Form dialog box, first select the label <INSERT TABLE
OF INVOICES HERE>. Then, select Insert Table/Form Advanced.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 17

Selecting Data Fields

Drag the desired data sources to the Template pane.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Selecting Data Fields


First select the data fields that you want to insert in the template and then define how to
format them. Drag an XML element from the left Data Source pane to the right Template
pane to select it. If the XML element has children, you will see a pop-up menu with the
following options:
Drop Single Node: Select this option if you want to move only the selected node.
Drop All Nodes: Select this option if you want to move the node and all its children.
Cancel: Cancels the selection.
If you drag an additional data field from the left Data Source pane to the right Template
pane, it is either inserted at the same level (Same Level) or below the node (Child) where
you release the node. The Insert Position box defines which way the node is inserted.
Note: If you use the left mouse button for drag and drop, the node and all children are
copied. However, if you use the right mouse button for dragging, a dialog box appears when
you release the mouse button. The dialog box gives you the option to copy either only the
selected node or the selected node and all children.
Demonstration: Drag G Invoices from the Data Source pane to the Template pane. Choose
Drop All Nodes in the pop-up menu.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 18

Removing Selected Fields

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Removing Selected Fields


You can also remove fields from the Template pane by selecting the desired field and
clicking the Delete key. Only one field may be deleted at a time.
Demonstration: After selecting the Drop All Nodes option, G Invoices and all of its child
fields are added to the Template pane, as shown above. Now, delete all of the child fields
except:
Trx Number
Transaction Data
Trans Amount
Trans Amount Remaining
Alternately, you could have selected G Invoices, chosen Drop Single Node, and then
dragged over just the children that you want to include in your table

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 19

Completing the Table

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Completing the Table


Click on an element in the Template pane to preview how the data fields will be formatted.
In the slide example, the G Invoices element is selected the Template pane. The Properties
and Preview regions on the right shows how the data fields will be formatted.
For each group you can set the following properties that describe how a group (such as
G Invoices) should be rendered by the Oracle BI Publisher Desktop:
Style: Select Table to create a table around the data fields.
Grouping: Grouping is an advanced operation that allows you to re-group the data
for example, by transaction date instead of currency. You can select the element that
the data should be grouped by for this property. Refer to the Oracle BI Publisher
Users Guide for additional information on grouping.
Show Grouping Value: This property will only be shown if you have selected a node
created by the Grouping functionality. You can choose for a group if the Data Field
node used as a grouping criterion is shown in the table or form.
Sort By: You can select an element by which the data groups are sorted.
Sort Order: If you have selected an element for Sort By you can select, if the data
should be sorted either ascending or descending.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 20

Completing the Table (continued)


Sort Data Type: If you have selected an element for Sort By, the data is sorted as Text
by default. That means that 12 will be shown after 111. If you need to sort numbers
you should select Number as the sort data type.
Break: This property allows you to insert a page break or a section break between
every data group. If nothing is select, then the data groups will be shown continuously
with no break. If you select New Page per Element, then a page break will be inserted
between each element. If you select New Section per Element, a section break will be
created for each data group. A section break allows changing the header/footer and
resets the page number. You will typically use this option, if you want to print multiple
documents (for example, invoices or purchase orders) to a single PDF file.
Click the OK button to create the table.
Note: The order in which the data elements are shown reflects the order of the columns in
the table. If you want to reorder the columns you need to change the Insert Position box
from Child to Same Level. Then drag the elements into the correct order.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 21

End Result
Your resulting table should look like the following:

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

End Result
The Oracle BI Publisher Desktop creates two kinds of form fields:
Form fields representing data elements
Form fields with processing instructions for repeating table rows or document section
Form fields representing data elements are replaced with the data when the template is
processed. The for-each G_INVOICES and end G_INVOICES form fields indicate a
repeating section. The section of the document encapsulated by these two form fields is
repeated, if the associated data element G_INVOICE is found repetitively in the data. Refer
to the Oracle BI Publisher Users Guide for additional information about form fields.
You can now format these elements in Microsoft Word and add additional text. You can also
move fields around as long as you keep them in the surrounding for-each G_INVOICES and
end G_INVOICES processing instruction. If you remove one of these processing
instructions your template may not work anymore with Oracle BI Publisher.
You now can preview the template again to review your current template (see above).

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

You probably would like to change the alignment of the table columns or change the data
type and format for the amounts. For example, select the TRANS_AMOUNT field, rightclick and select Properties to see the Text Form Field Options dialog box.
11i Oracle XML Publisher Fundamentals (NAMER) 5 - 22

Changing Field Properties


Select the TRANS_AMOUNT field. Then right-click
and select Properties to see the Text Form Field
Options dialog box.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Changing Field Properties


You may select Number in the Type field, #,##0.00 for Number format and enter
1,000.00 as the Default Number to achieve a more desirable format for currencies in US
Dollar. It is recommended not to use currency signs such as $ in the format string, because it
may lead to difficulties in supporting multiple languages with a single template.
Formatting options defined in this dialog box are understood by Oracle BI Publisher and
used to format your fields. Try to modify the template to get an idea which Word functions
are supported by Oracle BI Publisher.
Demonstration: Set the field properties shown above to both the TRANS_AMOUNT and
TRANS_AMOUNT_REMAINING fields. Then, in MS Word, set all columns except the
Transaction Date to display right-justified.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 23

Preview Your Progress

y
m

Copyright 2007, Oracle. All rights reserved.

Preview Your Progress


Before you preview you work, be certain to save it.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 24

Creating a Chart
1. Open or create a Template file.
2. Load the XML.
3. In the Insert menu, select Chart.
4. On the left tree panel, select the Parent element.
5. Select a value for Type.
6. Select a value for Grouping.
7. Select a value for Measure.
8. Click OK.
9. Look at the placeholder.
10. Save the Template.
11. Preview your report.
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Creating a Chart
Demonstration
Open the following file: D:\Program Files\Oracle\XML Publisher

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Desktop\samples\RTF templates\Sales Report\Retail Sales


Start.rtf

Load the RetailSales.xml file in the D:\Program Files\Oracle\XML Publisher


Desktop\samples\RTF templates\Sales Report folder by selecting Load XML Data in
the Data menu.

This data contains retail sales data for different industries. You will create a chart that shows
the sales per industry.
Note: Oracle BI Publisher does not support native Microsoft Word Charts. You need to
create charts using the Oracle BI Publisher Desktop.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 25

Inserting a Chart

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Inserting a Chart
Insert > Chart or Template Builder > Insert > Chart
The Chart dialog box allows you to insert a data driven chart into a template.
The data source pane shows the structure of the XML data. You will notice that you can
only select some of the nodes the data group nodes. Data Group nodes (parent nodes) are
nodes that have child nodes. They typically do not represent data attributes, but groups of
data such as an invoice, a purchase order, a purchase order line or a shipment.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Select a Data Group node in the data source pane that you would like to associate with the
graph. For example, you may have multiple invoices in the single XML document. If you
select the root node containing all invoices, the graph will be calculated over all invoices.
However, if you select the invoice node, the graph will be calculated using the data for a
single invoice.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 26

Inserting a Chart (continued)


Chart Options
Chart Type
BI Publishers charting feature is based on Oracle Business Intelligence Beans and it offers
all chart types provided by that module. Currently you can choose one of the following
options:
Bar Graph Vertical
Bar Graph Horizontal
Pie Chart
Line Chart
Dimension and Measure
Dimensions are categories by which summarized data can be viewed. Measures are the
primary numeric data for a dimension in which you are interested. The Dimension defines
what is often described on the X-Axis of a Graph, while the Measure is often plotted on the
Y-Axis. For example, if you are interested in seeing the revenue by country, state or city
then revenue is the measure and country, state and city are dimensions.
Select the data field node in the Dimension box as the dimension for the chart and in the
Measure box the data field node for the measure.
Legend

y
m

Define the text for the legend that describes the measure.
Support for More Chart Types
BI Publisher actually support about 70 distinct types and then variations on top of those
using Oracles BiBean technology to render the charts. BI Publisher calls the BiBeans
library using their XML APIs passing an XML chart definition and getting back either an
image or an SVG rendition of the chart for inclusion into the final output document.

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 27

Defining a Chart

y
m

Copyright 2007, Oracle. All rights reserved.

Defining a Chart
To create the chart as shown above, select the following:
Select Row in the data source pane.
Type = Pie Chart
Grouping = INDUSTRY
Measure = sum of SALES
Click OK

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 28

Placeholder

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Placeholder
A placeholder is put into your template, it will be replaced with the actual chart at runtime.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 29

Previewing Your Progress

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Previewing Your Progress


Preview > PDF/RTF or Template Builder > Preview > PDF/RTF
The slide example shows what the chart looks like if you select PDF or RTF format.
Note: remember to Save As before you preview.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 30

Summary
In this lesson, you should have learned how to create
and use a basic RTF template for Oracle BI Publisher
using Oracle BI Publisher Desktop.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 31

Practice 5: Overview
In this practice, you will perform the following tasks:
Insert Fields into a Template and Preview Results
Insert Table into a Template and Preview Results
Insert Chart into a Template and Preview Results

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 5 - 32

Creating RTF Templates

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to do
the following:
Explain the capabilities of an RTF template in
Oracle BI Publisher
Describe the two methods for creating Oracle BI
Publisher RTF templates

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 2

Methods of Creating RTF Templates


Although there are virtually unlimited ways to create
RTF templates for Oracle BI Publisher, only two
methods are supported:
Basic RTF method
Form Field method

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Methods of Creating RTF Templates


BI Publisher supports two methods for creating RTF templates:
Basic RTF method: Using any word processing application that supports RTF version
1.6 (or later) to design a template using Oracle BI Publishers simplified syntax
Form Field method: Using Microsoft Words form field feature, place the syntax in
hidden form fields rather than directly into your design. Oracle BI Publisher supports
this using Microsoft Word 2000 (or later) running Microsoft Windows 2000 (or later).

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 3

Basic Method
Start with the User Listing Start 2.rtf file. Edit
the RTF template using the basic method to place the
fields.
Start Microsoft Word.
In the template, replace all the text in < > (angle
brackets) with the appropriate Oracle BI Publisher
tags.
Enter <?USER_NAME?> in the User Name field.
Enter <?for-each:G_RESPS?> and
<?APPLICATION_NAME?> in the Application Name
column of the table.
Enter <?RESPONSIBILITY_NAME?> and
<?START_DATE?> in the corresponding columns.
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Basic Method
In the default Desktop install, the User Listing Start 2.rtf file is kept at the
following directory path:
D:\Program Files\Oracle\XML Publisher Desktop\samples\RTF
templates\User Listing\

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

For this class, you use Microsoft Word to create and edit your RTF files. But any program
capable of creating and editing RTF files can be used for the Basic method. The Form Field
method relies upon the Oracle BI Publisher Desktop plug-in that works only with Microsoft
Word 2000 and later.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 4

Finishing the Basic Method

Enter <?END_DATE?> and <?end for-each?> in


the End Date column of the table.
Save the new template as User Listing End
2.rtf.

Exit Microsoft Word.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 5

BI Publisher Template Viewer

To Start BI Publisher Template Viewer:

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

BI Publisher Template Viewer


BI Publisher Template Viewer is a Java application that facilitates the rapid development of
format templates for use with Oracle BI Publisher. The application requires Java Runtime
Environment (JRE) Version 1.4.2 or higher installed on your desktop. The Template Viewer
enables you to preview:
RTF Templates
PDF forms
eText Templates
XSL-FO Stylesheets
In general, the Template Viewer is a tool for the advanced user, whereas the Template
Builder for Word provides more tools for the creation of RTF Templates and is easier to use.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 6

Why Use Template Viewer?

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Why Use Template Viewer?


In most cases, if you have to insert fields using the Basic method, you are doing so for one
of three reasons.
1. You prefer the Basic method.
2. You are using an editor other than Microsoft Word 2000 or later.
3. You are entering advanced tags.
Most users do not use the Basic method by preference. They do so either because they are
not using Microsoft Word or they are using advanced tags. Because you are not using any
advanced tags in this exercise, assume that you are not using Microsoft Word.
If you are using Microsoft Word, you can view the results of your report directly in Oracle
BI Publisher Desktop. But the Template Viewer reproduces the same capabilities, and it has
capabilities that are not available to you via Microsoft Word (namely, viewing PDF
templates).

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 7

Viewing the Report


Point the Template Viewer to your working directory:

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Viewing the Report


The left pane lists XML data files; the right pane shows RTF and PDF templates. Doubleclick the XML to spawn the XML in a browser, and then double-click the template to start
your RTF editor (for example, Microsoft Word or Adobe Acrobat depending on the template
type).
To generate an output, select the XML, a template, and the output format from the dropdown list. Enter a locale and then click the Start Processing button. The bottom pane shows
any logging or error information during the processing phase.
In this case, your working directory is the following:

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

D:\Program Files\Oracle\XML Publisher Desktop\samples\RTF


templates\User Listing\

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 8

Steps for Viewing a Report

(2)

(1)

(3)

(4)

Copyright 2007, Oracle. All rights reserved.

Steps for Viewing a Report


1. Select the data source (FNDSCURX.xml).
2. Select the template (User Listing End 2.rtf).
3. Select the output format (PDF).
4. Click the Start Processing button to produce your output.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

y
m

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 9

Viewing the Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Viewing the Report


If you have done everything correctly, you should see Adobe Acrobat Reader open with the
output of your report. If not, you have done something in error and must return to Microsoft
Word to edit your file until it produces the correct output.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 10

Form Field Method


Start with the User Listing Start.rtf file. Edit the
RTF template using the Form Field method to place the
fields.
Use the following steps:
1. Start Microsoft Word.
2. In the template, replace all the text in < > (angle
brackets) with the appropriate Oracle BI Publisher
tags.
Note: Before you can use the Form Field method,
you must load the associated XML data.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Form Field Method


In the default Desktop install, the User Listing Start 2.rtf file is kept at the
following directory path:
D:\Program Files\Oracle\XML Publisher Desktop\samples\RTF
templates\User Listing\

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

For this class, you use Microsoft Word to create and edit our RTF files. But any program
capable of creating and editing RTF files can be used for the Basic method. The Form Field
method relies on the Oracle BI Publisher Desktop plug-in that only works in Microsoft
Word 2000 and later.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 11

Loading the XML Data

3. Load the XML data using the Oracle BI Publisher


Desktop (Template Builder) menu.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Loading the XML Data


Data > Load XML Data or Template Builder > Data > Load XML Data

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 12

Loading the XML Data

4. Select your XML data source (FNDSCURX.xml), and


check for the confirmation message.

5. In the Oracle BI Publisher Desktop menu, choose


Insert > Field.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 13

Inserting Fields
6. When the Field selector opens, select
USER_NAME from the list, and then click Insert.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 14

Previewing Progress
7. Your RTF template should look similar to the
following at this point:

gray
8. Notice that the USER_NAME field is GRAY
color, indicating that it is a form field.

in

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 15

Creating a Data Table

9. Create a data table for the rest of the data. Unlike


the basic method, you are not going to start with a
table created for you. You are going to let Oracle
BI Publisher Desktop create one for you.
10. Choose Insert > Table/Form > Advanced.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 16

Using the Insert Table/Form Window


The Insert Table/Form window appears.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 17

Selecting G_RESPS
11. Click G_RESPS in the Data Source pane, and then
drag it to the Template pane.
12. You are prompted to select Drop Single Node,
Drop All Nodes, or Cancel. Select Drop All Nodes
to grab the four fields beneath G_RESPS.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 18

Dropping the Nodes

When you drop all the nodes, the Template pane


looks like the following:

13. Click OK in the Insert Table/Form window to save


your work and then return to the template.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 19

Completed Template

When you return to your template, your table will


have been created for you. Your template should
look similar to the following:

Notice that the wizard has created the table, the


fields in the table, and the <for-each> looping
mechanism to loop through all the data.

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 20

Previewing Your Report


14. Save your template as User Listing End.rtf.
15. You can preview your results in Microsoft Word,
or you can use the Template Viewer.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 21

Viewing the Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Viewing the Report


If you have done everything correctly, you should see Adobe Acrobat Reader open with the
output of your report. If not, you have done something in error and you must return to
Microsoft Word to edit your file until it produces the correct output.
Your report should look exactly the same whether you produce it from Microsoft Word or
you use the Template Viewer.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 22

Designing the RTF Template

Premarkup layout
Supported native formatting features
Add markup
Images and charts
Template features
Conditional formatting
Page-level calculations
Data handling
Variables, parameters, and properties
Advanced report layouts

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Designing the RTF Template


RTF is a specification used by common word processing applications such as Microsoft
Word. When you save a document, RTF is a file type option that you select.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

BI Publishers RTF Template Parser converts documents saved as the RTF file type into
XSL-FO. You can therefore create report designs using many of your standard word
processing applications design features, and BI Publisher will recognize and maintain the
design.
During design time, you add data fields and other markup to your template using BI
Publishers simplified tags for XSL expressions. These tags associate the XML report data
with your report layout. If you are familiar with XSL and prefer not to use the simplified
tags, BI Publisher also supports the use of pure XSL elements in the template.
In addition to your word processing applications formatting features, BI Publisher supports
other advanced reporting features such as conditional formatting, dynamic data columns,
running totals, and charts.
If you want to include code directly in your template, you can include any XSL element,
many FO elements, and a set of SQL expressions extended by BI Publisher.
Note: Some features of your word processor may not be mappable to XSL-FO.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 23

Summary
In this module, you should have learned how to:
Explain the capabilities of an RTF template in
Oracle BI Publisher
Describe the two methods for creating Oracle BI
Publisher RTF templates

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 24

Practice 6: Overview
This practice covers the following topics:
Adding fields to an RTF template using the basic
method
Viewing output using the template viewer
Adding form fields to an RTF template
Previewing results

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 6 - 25

y
m

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Advanced RTF Template Techniques

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this module, you should be able to
describe and use advanced RTF template techniques.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 2

Know Your Data


Oracle BI Publisher does not provide an automated
(intelligent) mapping mechanism. Therefore, you must
understand the data you are using and then correctly
map it so that it to appears properly in your report.
There are two useful methods for exploring and
understanding data:
Looking at the raw XML data
Looking at the data structure in the Field window
in Oracle BI Publisher Desktop

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Know Your Data


In the previous lesson, you were explicitly told to include certain fields or type certain tags,
such as <?USER_NAME?>, but how do you know what to enter or what to drag and drop?
Since BI Publisher does not provide an automated mapping mechanism, you must know
your data.
Your template content and layout must correspond to the content and hierarchy of the input
XML file. Each data field in your template must map to an element in the XML file. Each
group of repeating elements in your template must correspond to a parent-child relationship
in the XML file. Specifically, to map the data fields you define placeholders. To designate
the repeating elements, you define groups.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 3

Looking at Raw XML Data


This snippet of XML data is a sample of what you
might be provided. Most raw XML data can be difficult
to read (except the very simplest data). And, because it
is difficult, you might make errors.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Looking at Raw XML Data


Each data field in your report template must correspond to an element in the XML file.
When you mark up your template design, you define placeholders for the XML elements.
The placeholder maps the template report field to the XML element. At run time, the
placeholder is replaced by the value of the element of the same name in the XML data file.
This is a good example of data coming from an outside source. In this case, the data was
produced by Oracle Reports running from within an 11i Oracle E-Business Suite database
and querying the user data from that system. To fully understand this data, you would have
to understand 11i Oracle E-Business Suite security. But it is not uncommon for XML
coming from other systems to produce unnecessary XML tags before the first tag of interest.
In this data, the first tag of interest is the <USER_NAME>SYSADMIN</USER_NAME> tag.
Notice the group data, <G_RESPS>, beneath that <USER_NAME> tag.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Note: Because this is a portion of the file, the closing tags are not all present.

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 4

Looking at the Field Dialog Box


The Field dialog box
(accessed by selecting
Insert > Field) is much
less error prone. You can
see Tabular structures
more easily.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Looking at the Field Dialog Box


Insert Field or Template Builder Insert Field
The Field dialog box allows you to select data elements defined in the data source (that is,
the XML file) and insert them into the template.
The dialog box shows the structure of the data source in a tree view. As you have already
learned, you select a field that represents a single data field (a leaf node of the tree) and click
Insert to place a text form field with hidden XML Publisher commands (in the help text of
the form field) at the cursor position in the template.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 5

Underlying Tags
In the Basic method, it is easy to see the relationship
between the XML data and the tag.
XML data
= <USER_NAME>
Placeholder = <?USER_NAME?>
But how does the Form Field method create tags?

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 6

Form Field Method Tags

Right-click the field, and then choose Properties to


open the Text Form Field Options window.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Form Field Method Tags


Note that the placeholder, even with the Form Field method, is still <?USER_NAME?>,
which is what it would be if you used the Basic method.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 7

Additional Tag Space


There are two places to put tags: Status Bar (first)
and Help Key (F1) (second).

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Additional Tag Space


There is a major issue to make note of at this point. There is a limitation of the Form Field
method. The Status Bar part of the Additional Help Text is limited to 138 characters. The
Help Key (F1) part is limited to 255 characters. These two areas are simply concatenated
with Status Bar appearing first followed by Help Key. So, in total, you are limited to 393
characters. If you have placeholders that stretch capabilities, or if you use advanced
functions that go beyond 393 characters, you must use the Basic method.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 8

Premarkup Layout
Oracle BI Publisher converts all formatting that you
apply in the word processing program to XSL-FO.
But some features of your word processor may not be
mappable to XSL-FO.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 9

Supported Native Formatting Features

General features
Alignment
Tables
Date fields
Multicolumn page support

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Supported Native Formatting Features


General Features
Large blocks of text
Page breaks and page numbering
Alignment: Supported for text, graphics, objects, and tables
Bidirectional languages are handled automatically using your word processing
applications left and right alignment controls.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Tables
Nested tables, auto-formatting of tables, and repeating table headers
Cell alignment; cell patterns and colors
Row and column spanning
Prevent rows from breaking across pages
Fixed-width columns
Truncated fields

e
l
c

a
r
O

Date fields: Correspond to publishing date, not the request run date
Multicolumn page support: Enables you to use the multiple column function from
Microsoft Word to publish your output
For more information on supported features, see the Oracle BI Publisher Users Guide.
11i Oracle XML Publisher Fundamentals (NAMER) 7 - 10

Designing the Template Layout

Select the size, font, and alignment of text.


Insert bullets and numbering.
Draw borders around paragraphs.
Include watermarks.
Include images (.jpg, .gif, or .png).

Create tables and use table autoformatting


features.
Insert headers and/or footers.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 11

Add Markup

Placeholders
<?XML element tag name?>

XML data value (example)


<?USER_NAME?>

Groups (example)
<?for-each:USER_NAME?>
<?end for-each?>

Headers and footers


Use native RTF headers and footers.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Add Markup
You can easily mix manual markup and markup done in Oracle BI Publisher Desktop. In
fact, Oracle BI Publisher Desktop is just using the hidden Form Field method available
within Microsoft Word 2000 (and later).
Identifying Placeholders and Groups
Your template content and layout must correspond to the content and hierarchy of the input
XML file. Each data field in your template must map to an element in the XML file. Each
group of repeating elements in your template must correspond to a parent-child relationship
in the XML file.
Placeholders
Each data field in your report template must correspond to an element in the XML file.
When you mark up your template design, you define placeholders for the XML elements.
The placeholder maps the template report field to the XML element. At run time, the
placeholder is replaced by the value of the element of the same name in the XML data file.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 12

Add Markup (continued)


Defining Groups
By defining a group, you are notifying Oracle BI Publisher that for each occurrence of an
element (parent), you want the included fields (children) displayed. At run time, Oracle BI
Publisher will loop through the occurrences of the element and display the fields each time.
To designate a group of repeating fields, insert the grouping tags around the elements to
repeat.
The group element must be a parent of the repeating elements in the XML input file.
If you insert the grouping tags around text or formatting elements, the text and
formatting elements between the group tags will be repeated.
If you insert the tags around a table, the table will be repeated.
If you insert the tags around text in a table cell, the text in the table cell between the
tags will be repeated.
If you insert the tags around two different table cells, but in the same table row, the
single row will be repeated.
If you insert the tags around two different table rows, the rows between the tags will be
repeated (this does not include the row that contains the end group tag).
Headers and Footers
Oracle BI Publisher supports the use of the native RTF header and footer feature. To create a
header or footer, use the your word processing applications header and footer insertion
tools. As an alternative, you can define an internal template in the body of your template,
and then call this subtemplate from the header or footer region. See Header and Footer
Template Alternative of the Oracle BI Publisher Users Guide.
If your template requires multiple headers and footers, create them by using Oracle BI
Publisher tags to define the body area of your report. When you define the body area, the
elements occurring before the beginning of the body area will compose the header. The
elements occurring after the body area will compose the footer. Use the following tags to
enclose the body area of your report:

<?start:body?>

<?end body?>

y
m

e
d
a

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Use the tags either directly in the template or in form fields.


At the time of this writing, Microsoft Word does not support form fields in the header and
footer. You must, therefore, insert the placeholder syntax directly into the template (basic
RTF method), or use the header and footer template alternative.
If you require many or complex objects in the header or footer of your report, these regions
can become difficult to read or understand. As an alternative, you can create header and
footer templates in the body of your RTF template document that can then be called from
the header or footer region.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 13

Add Markup (continued)


Subtemplates
To create a template within your template, simply wrap the contents of the internal template
with the following tags:

<?template:internaltemplate name?>

<?end template?>
In this code, internaltemplate name is the name that you assign to the
header/footer template.
Then in the header/footer region, simply enter the following syntax to call this template:

<?call:internaltemplate name?>
At run time, the contents of the internal template will render at the position of the call.
Example
Assume that you have the following XML data:
<REPORT>
<COMPANY_NAME>Oracle</COMPANY_NAME>
<REPORT_NAME> Accounts Payables Invoice
Listing</REPORT_NAME>
<REPORT_DATE>1st January 2005</REPORT_DATE>
<LEGAL_TEXT>Private and Confidential</LEGAL_TEXT>
...
/<REPORT>

y
m

e
d
a

c
A

You want the COMPANY_NAME, REPORT_NAME, and REPORT_DATE to be displayed in a


table in the header of the report. In the header of your template, enter the following:

<?call:OraHeader/>

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

At run time, the OraHeader template will be rendered in the header of each page of the
document.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 14

Images and Charts


Oracle BI Publisher supports several methods for
including images and charts in an Oracle BI Publisher
report:
Direct insertion
URL reference
OA_MEDIA directory reference
Image retrieved from BLOB data
Leveraging Oracle Business Intelligence Beans
(BI Beans) to add charts and graphs to an RTF
template

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Images and Charts


BI Publisher supports several methods of including images or charts.
Direct Insertion
Insert the .jpg, .gif, or .png image directly in your template.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

URL Reference
Insert a dummy image in your template. For layout purposes, it is best if the dummy
image is the same size, in pixel height and width, as your actual image.
In the Format Picture dialog box (right-click the image to open), click the Web tab.
Enter the following syntax in the Alternative Text region:
url:{http://image.location.com/image-name}
OA_Media Directory Reference
OA_MEDIA method refers to only Oracle E-Business Suite installations. Otherwise, it is the
same as the URL reference with the Alternative Text changing to the following:
url:{${OA_MEDIA}/image-name}

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 15

Images and Charts (continued)


Rendering an Image Retrieved from BLOB Data
If your data source is an Oracle BI Publisher Data Template, and your results XML contains
image data that had been stored as a BLOB in the database, use the following syntax in a
form field inserted in your template where you want the image to render at run time:
<fo:instream-foreign-object content type="image/jpg">
<xsl:value-of select="IMAGE_ELEMENT"/>
</fo:instram-foreign-object>
Here, image/jpg is the MIME type of the image (other options might be: image/gif
and image/png) and IMAGE_ELEMENT is the element name of the BLOB in your XML
data.
You can specify height and width attributes for the image to set its size in the published
report. Oracle BI Publisher will scale the image to fit the box size that you define. For
example, to set the size of the example above to three inches by four inches, enter the
following:
<fo:instream-foreign-object content type="image/jpg"
height="3 in" width="4 in">
<xsl:value-of select="IMAGE_ELEMENT"/>
</fo:instram-foreign-object>
Specify in pixels as follows:
<fo:instream-foreign-object content type="image/jpg"
height="300 px" width="4 px">

y
m

e
d
a

c
A

Or in centimeters:
<fo:instream-foreign-object content type="image/jpg"
height="3 cm" width="4 cm">

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Or as a percentage of the original dimensions:


<fo:instream-foreign-object content type="image/jpg"
height="300%" width="300%">
Chart Support
XML Publisher leverages the graph capabilities of Oracle Business Intelligence Beans
(BI Beans) to enable you to define charts and graphs in your RTF templates that will be
populated with data at run time. XML Publisher supports all the graph types and component
attributes available from the BI Beans graph DTD.
The BI Beans graph DTD is fully documented in the following technical note available from
the Oracle Technology Network
http://www.oracle.com/technology/products/reports/htdocs/getstart/whitepapers/graphdtd/
graph_dtd_technote_2.html
There is also information in the BI Publisher blogs:
http://blogs.oracle.com/xmlpublisher/

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 16

Adding a Chart

Insert a dummy image in your template to define


the size and position of the chart.
Add a definition for the chart to the Alternative
Text box of the dummy image. The chart definition
requires XSL commands.
At run time, Oracle BI Publisher calls the
appropriate BI Bean to render the image that is
inserted into the final output.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Adding a Chart
The process generates a placeholder. The text of that placeholder can be viewed by rightclicking the image placeholder, choosing Format Picture, and then clicking the Web tab.
Note: For more information, see Chapter 2 in the Oracle BI Publisher Users Guide.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 17

Chart Samples

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Chart Samples
There are only four supported chart types in BI Publisher Desktop, although BI Publisher
actually supports approximately 70 chart types.
Bar Vertical
Bar Horizontal
Pie
Line

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 18

Support for Drawings, Shapes,


and Clip Art
The following AutoShape categories are supported:
Lines: Straight, arrowed, connectors, curve, freeform, and scribble
Connectors: Only straight connectors
Basic Shapes: All shapes supported
Block Arrows: All arrows supported
Flowchart: All objects supported
Stars and banners: All objects supported
Callouts: Line callouts not supported
Clip art: To add images using the Microsoft Clip
Art libraries
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 19

Other Graphic Features

Freehand drawing: Supported


Hyperlinks: Supported
Layering: Supported
3-D effects: Not currently supported
Microsoft Equation: Supported
Organization Chart: Supported
WordArt: Mostly supported

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Other Graphic Features


Freehand Drawing: Use the freehand drawing tool in Microsoft Word to create drawings in
your template to be rendered in the final PDF output.
Hyperlinks: You can add hyperlinks to your shapes.
Layering: You can layer shapes on top of each other and use the transparency setting in
Microsoft Word to allows shapes on lower layers to show through.
3-D Effects: BI Publisher does not currently support the 3-D option for shapes.
Microsoft Equation: Use the equation editor to generate equations in your output.
Organization Chart: Use the organization chart functionality in your templates and the
chart will be rendered in the output.
WordArt: You can use Microsoft Words WordArt functionality in your templates.
Note: Some Microsoft WordArt uses bitmap operations that currently cannot be converted
to SVG (Scalable Vector Graphic). To use the unsupported WordArt in your template, take a
screenshot of the WordArt and save it as an image (.gif, .jpeg, or .png). Replace the
WordArt with the image.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 20

Data-Driven Shape Support


In addition to supporting the static shapes and
features in your templates, Oracle BI Publisher
supports the manipulation of shapes based on
incoming data or parameters.
The following manipulations are supported:
Replicate
Move
Change size
Add text
Skew
Rotate
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Data-Driven Shape Support


Enter manipulation commands for a shape in the Web tab of the shapes properties dialog
box (right-click, and then select Format AutoShape > Web > Alternative Text).
Replicating a Shape
You can replicate a shape based on incoming XML data in the same way you replicate data
elements in a for-each loop. To do this, use a for-each@shape command in conjunction with
a shape-offset declaration. For example, use this syntax to replicate a shape down the page:
<?for-each@shape:SHAPE_GROUP?>
<?shape-offset-y:(position()-1)*100?>
<?end for-each?>
In this example, for-each@shape opens the for-each loop for the shape context, and
SHAPE_GROUP is the name of the repeating element from the XML file. For each occurrence
of the SHAPE_GROUP element, a new shape is created. shape-offset-y: is the command to
offset the shape along the y-axis. (position()-1)*100) sets the offset in pixels per
occurrence. The XSL position command returns the record counter in the group (that is, 1, 2,
3, 4, and so on); 1 is subtracted from that number and the result is multiplied by 100.
Therefore, for the first occurrence, the offset would be 0: (1-1) * 100. The offset for the
second occurrence would be 100 pixels: (2-1) *100. Subsequently, each offset would be
another 100 pixels down.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 21

Data-Driven Shape Support (continued)


Adding Text to a Shape
You can add text to a shape dynamically either from the incoming XML data or from a
parameter value. In the properties dialog box, enter the following syntax:
<?shape-text:SHAPETEXT?>
Here, SHAPETEXT is the element name in the XML data. At run time, the text will be
inserted into the shape.
Adding Text Along a Path
You can add text along a line or curve from incoming XML data or a parameter. After
drawing the line, in the properties dialog box enter:
<?shape-text-along-path:SHAPETEXT?>
Here, SHAPETEXT is the element from the XML data. At run time the value of the
SHAPETEXT element will be inserted above and along the line.
Moving a Shape
You can move a shape or transpose it along both the x and y axes based on the XML data.
For example, to move a shape 200 pixels along the y-axis and 300 along the x-axis, enter the
following commands in the properties dialog box of the shape:
<?shape-offset-x:300?>
<?shape-offset-y:200?>

y
m

e
d
a

Rotating a Shape
To rotate a shape about a specified axis based on the incoming data, use the following
command:
<?shape-rotate:ANGLE;POSITION?>
Here, ANGLE is the number of degrees to rotate the shape. If the angle is positive, the
rotation is clockwise; if it is negative, the rotation is counterclockwise. POSITION is the
point about which to carry out the rotation (for example, left/top). Valid values are
combinations of left, right, or center with center, top, or bottom. The default is left/top.
Skewing a Shape
You can skew a shape along its x- or y-axis using the following commands:
<?shape-skew-x:ANGLE;POSITION?>
<?shape-skew-y:ANGLE;POSITION?>

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Where ANGLE is the number of degrees to skew the shape. If the angle is positive, the skew
is to the right. POSITION is the point about which to carry out the rotation (for example,
left/top). Valid values are combinations of left, right, or center with center, top, or bottom.
The default is left/top.
For example, to skew a shape by 30 degrees about the bottom-right corner, enter the
following:
<?shape-skew-x:number(.)*30;right/bottom?>

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 22

Data-Driven Shape Support (continued)


Changing the Size of a Shape
You can change the size of a shape using the appropriate commands either along a single
axis or along both axes. To change a shapes size along both axes, use:
<?shape-size:RATIO?>
Here, RATIO is the numeric ratio to increase or decrease the size of the shape. Therefore, a
value of 2 would generate a shape twice the height and width of the original. A value of 0.5
would generate a shape half the size of the original.
To change a shapes size along the x- or y-axis, use:
<?shape-size-x:RATIO?>
<?shape-size-y:RATIO?>
Changing only the x or y value has the effect of stretching or shrinking the shape along an
axis. This can be data driven.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 23

Background and Watermark Support


Oracle BI Publisher supports the Background feature
in Microsoft Word. You can specify a single, graduated
color or an image background for your template to be
displayed in the PDF output.
This feature is supported for PDF output only.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Background and Watermark Support


To add a background using Microsoft Word 2000, select Format > Background.
In Microsoft Word 2002 or later, you can add a text or image watermark by selecting Format
> Background > Printed Watermark.
In the Background menu, you can:
Select a single-color background from the color palette
Select Fill Effects to open the Fill Effects dialog box

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 24

Template Features

Page breaks
Initial page numbers
Hyperlinks
Table of contents
Bookmarks in PDF output
Check boxes
Drop-down lists

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Template Features
Page Breaks
To create a page break after the occurrence of a specific element, use the split-bypage-break alias. This will cause the report output to insert a hard page break between
every instance of a specific element.
You can also insert a form field immediately following the form field of the element after
which you want the page break to occur. In the help text of this form field, enter the
following:
<?split-by-page-break:?>

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 25

Template Features (continued)


Initial Page Numbers
Some reports require that the initial page number be set at a specified number. For example,
monthly reports may be required to continue numbering from month to month. Oracle BI
Publisher allows you to set the page number in the template to support this requirement.
Use the following syntax in your template to set the initial page number:
<?initial-page-number:pagenumber?>
Here, pagenumber is the XML element or parameter that holds the numeric value.
Example 1: Suppose that your XML data contains an element to carry the initial page
number, as in this example:
<REPORT>
<PAGESTART>200<\PAGESTART>
....
</REPORT>
Enter the following in your template:
<?initial-page-number:PAGESTART?>
Your initial page number will be the value of the PAGESTART element, which in this case is
200.
Example 2: Suppose that you set the page number by passing a parameter value. If you
define a parameter called PAGESTART, you can pass the initial value by calling the
parameter. Enter the following in your template:
<?initial-page-number:$PAGESTART?>

y
m

e
d
a

c
A

Note: You must first declare the parameter in your template. See Defining Parameters in
Your Template in the Oracle BI Publisher Users Guide.
Hyperlinks
You can add fixed or dynamic hyperlinks to your template:
To insert static hyperlinks, use your word processing applications insert hyperlink
feature.
If your template includes a data element that contains a hyperlink or part of one, you
can create dynamic hyperlinks at run time. In the Type the file or Web page name
field of the Insert Hyperlink dialog box, enter the following:
{URL_LINK}
where URL_LINK is the incoming data element name.
If you have a fixed URL that you want to pass parameters to, enter the following
syntax:
http://www.oracle.com?product={PRODUCT_NAME}
where PRODUCT_NAME is the incoming data element name.
In both these cases, the dynamic URL will be constructed at run time.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 26

Template Features (continued)


Table of Contents
Oracle BI Publisher supports the RTF specifications feature for generating a table of
contents. Follow your word processing applications procedures for inserting a table of
contents. Oracle BI Publisher also provides the ability to create dynamic section headings in
your document from the XML data. You can then incorporate these into a table of contents.
To create dynamic headings:
1. Enter a placeholder for the heading in the body of the document, and format it as a
Heading, using your word processing applications style feature. You cannot use
form fields for this functionality.
For example, you want your report to display a heading for
each company reported. The XML data element tag name is
<COMPANY_NAME>. In your template, enter <?COMPANY_NAME?>
where you want the heading to appear. Now format the text
as a Heading.

2. Create a table of contents using your word processing applications table of contents
feature.
3. At run time, the TOC placeholders and heading text will be substituted.
Generating Bookmarks in PDF Output
If you have defined a table of contents in your RTF template, you can use your table of
contents definition to generate links in the Bookmarks tab in the navigation pane of your
output PDF. The bookmarks can be either static or dynamically generated.
To create links for a static table of contents, enter:
<?copy-to-bookmark:?>
directly above your table of contents and
<?end copy-to-bookmark:?>
directly below the table of contents.
To create links for a dynamic table of contents, enter:
<?convert-to-bookmark:?>
directly above the table of contents and
<?end convert-to-bookmark:?>
directly below the table of contents.
Check Boxes
You can include a check box in your template that you can define to display as selected
(Checked) or deselected (Not Checked) based on a value from the incoming data. To define
a check box in your template:
1. Position the cursor in your template where you want the check box to appear, and
select the Check Box Form Field on the Forms toolbar.
2. Right-click the field to open the Check Box Form Field Options dialog box.
3. Specify the default value as either Checked or Not Checked.
4. In the Form Field Help Text dialog box, enter the criteria for how the box should
behave. This must be a Boolean expression (that is, one that returns a true or false
result). For example, suppose your XML data contains an element called
<population>. You want the check box to appear selected if the value of
<population> is greater than 10,000. Enter the following in the help text field:
<?population>10000?>
5. Note that you do not have to construct an if statement. The expression is treated as
an if statement.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 27

Template Features (continued)


Drop-Down Lists
Oracle BI Publisher enables you to use the drop-down form field to create a cross-reference
in your template from your XML data to some other value that you define in the drop-down
form field. For example, suppose you have the following XML:
<countries>
<country>
<name>Chad</name>
<population>7360000</population>
<continentIndex>5</continentIndex>
</country>
<country>
<name>China</name>
<population>1265530000</population>
<continentIndex>1</continentIndex>
</country>
<country>
<name>Chile</name>

y
m

<population>14677000</population>

e
d
a

<continentIndex>3</continentIndex>
</country>
. . .
</countries>

c
A

Notice that each <country> entry has a <continentindex> entry, which is a numeric
value to represent the continent. Using the drop-down form field, you can create an index in
your template that will cross-reference the <continentindex> value to the actual
continent name. You can then display the name in your published report. To create the index
for the continent example:
1. Position the cursor in your template where you want the value from the drop-down list
to appear, and select the Drop-Down Form Field from the Forms toolbar.
2. Right-click the field to display the Drop-Down Form Field Options dialog box.
3. Add each value to the Drop-down item field and then click Add to add it to the
Items in drop-down list group. The values will be indexed starting from 1 for the
first. For example, the list of continents will be stored as follows:
Index
Value
1
Asia
2
North America
3
South America
4
Europe
5
Africa
6
Australia
Now use the Help Text box to enter the XML element name that will hold the index for the
drop-down field values. For this example, enter <?continentIndex?>.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 28

Conditional Formatting
Oracle BI Publisher supports the use of the following
types of conditional formatting:
if statements
if statements in boilerplate text
if-then-else statements
choose statements

Column formatting
Row formatting
Conditionally displaying a row
Cell highlighting

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Conditional Formatting
Conditional formatting occurs when a formatting element appears only when a certain
condition is met. Oracle BI Publisher supports the usage of simple if statements, as well as
more complex choose expressions. The conditional formatting that you specify can be
XSL or XSL:FO code, or you can specify actual RTF objects such as a table or data. For
example, you can specify that if reported numbers reach a certain threshold, they will
display shaded in red. Or you can use this feature to hide table columns or rows depending
on the incoming XML data.
if Statements
Use an if statement to define a simple condition. If a data field is a specific value:
Insert the following syntax to designate the beginning of the conditional area:
<?if:condition?>
Insert the following syntax at the end of the conditional area: <?end if?>

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

For example, to set up the Payables Invoice Register to display invoices only when the
Supplier name is Company A, insert the syntax
<?if:VENDOR_NAME=COMPANYA?> before the Supplier field on the template. Enter
the <?end if?> tag after the invoices table.
Note: You can insert the syntax in form fields or directly into the template.
11i Oracle XML Publisher Fundamentals (NAMER) 7 - 29

Conditional Formatting (continued)


if Statements in Boilerplate Text
Assume you want to incorporate an if statement into the following free-form text:
The program was (not) successful.
You want the word not to appear only if the value of an XML tag called <SUCCESS>
equals N. To achieve this requirement, you must use the Oracle BI Publisher context
command to place the if statement into the inline sequence rather than into the block (the
default placement). Note: For more information about context commands, see Using
Context Commands in the Oracle BI Publisher Users Guide.
For example, suppose that you construct the code as follows:
The program was <?if:SUCCESS=N?>not<?end if?> successful.
The following undesirable result will occur:
The program was
not
successful.
This happens because Oracle BI Publisher applies the instructions to the block by default.
To specify that the if statement should be inserted into the inline sequence, enter:
The program was <?if@inlines:SUCCESS=N?>not<?end if?> successful.
This construction will result in one of two displays. If SUCCESS does not equal
N, the display will be The program was successful. If SUCCESS equals
N, the display will be The program was not successful.
if-then-else Statements

y
m

e
d
a

c
A

Oracle BI Publisher supports the common programming construct if-then-else. This is


extremely useful when you need to test a condition and conditionally show a result. For
example:
IF X=0 THEN
Y=2
ELSE
Y=3
END IF

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

You can also nest these statements as follows:


IF X=0 THEN
Y=2
ELSE
IF X=1 THEN
Y=10
ELSE Y=100
END IF

e
l
c

a
r
O

Use the following syntax to construct an if-then-else statement in your RTF template:
<?xdofx:if element_condition then result1 else result2 end
if?>
11i Oracle XML Publisher Fundamentals (NAMER) 7 - 30

Conditional Formatting (continued)


For example, the following statement tests the AMOUNT element value. If the value is greater
than 1000, show the word "Higher"; if it is less than 1000, show the word "Lower"; if it is
equal to 1000, show "Equal":
<?xdofx:if AMOUNT > 1000 then Higher
else
if AMOUNT < 1000 then Lower
else
Equal
end if?>
choose Statements
Use the choose, when, and otherwise elements to express multiple conditional tests. If
certain conditions are met in the incoming XML data, specific sections of the template will
be rendered. This is a very powerful feature of the RTF template. In regular XSL
programming, if a condition is met in the choose command, further XSL code is executed.
Use the following syntax for these elements:
<?choose:?>
<?when:expression?>
<?otherwise?>
Column Formatting
You can conditionally show and hide columns of data in your document output.
Row Formatting

e
d
a

y
m

Oracle BI Publisher allows you to specify formatting conditions as the row-level of a table.
Examples of row-level formatting are:
Highlighting a row when the data meets a certain threshold
Alternating background colors of rows to ease readability of reports
Showing only rows that meet a specific condition
Conditionally Displaying a Row
To display only rows that meet a certain condition, insert the <?if:condition?>
<?end if?> tags at the beginning and end of the row, within the for-each tags for the
group. This is demonstrated in the following sample template.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 31

Conditional Formatting (continued)


Cell Highlighting
The code to highlight the debit column as shown in the table is:
<?if:debit>1000?>
<xsl:attribute
xdofo:ctx="block" name="background-color">red
</xsl:attribute>
<?end if?>
The if statement tests whether the debit value is greater than 1,000. If it is, the next lines are
invoked. Notice that the example embeds native XSL code inside the if statement. The
attribute element allows you to modify properties in the XSL. The xdofo:ctx
component is an Oracle BI Publisher feature that allows you to adjust XSL attributes at any
level in the template. In this case, the background-color attribute is changed to red.
To change the attribute, you can use either the standard HTML names (for example, red,
white, green), or you can use the hexadecimal color definition (for example, #FFFFF).
Note: Examples of conditional formatting can be found in Chapter 1 of the BI Publisher
Users Guide.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 32

Page-Level Calculations

Oracle BI Publisher supports the use of the


following types of page-level calculations:
Page totals
Brought-forward or carried-forward totals
Running totals

These features are performed by the PDFformatting layer. Therefore, they are not available
for other outputs types such as HTML, RTF, and
Excel.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Page-Level Calculations
Displaying Page Totals
Oracle BI Publisher allows you to display calculated page totals in your report. Because the
page is not created until publishing time, the totaling function must be executed by the
formatting engine.
Note: Page totaling is performed in the PDF-formatting layer. Therefore this feature is not
available for other output types: HTML, RTF, Excel.
Because the page total field does not exist in the XML input data, you must define a variable
to hold the value. When you define the variable, you associate it with the element from the
XML file that is to be totaled for the page. Once you define total fields, you can also
perform additional functions on the data in those fields.
To declare the variable that is to hold your page total, insert the following syntax
immediately following the placeholder for the element that is to be totaled:
<?add-page-total:TotalFieldName;element?>
Here, TotalFieldName is the name you assign to your total (to reference later), and
element is the XML element field to be totaled.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 33

Page-Level Calculations (continued)


You can add this syntax to as many fields as you want to total. Then, when you want to
display the total field, enter the following syntax:
<?show-page-total:TotalFieldName;number-format?>
Here, TotalFieldName is the name you assigned to give the page total field above,
and number-format is the format you want to use for the display.
Note that this page totaling function will work only if your source XML has raw numeric
values. The numbers must not be preformatted.
Brought-Forward and Carried-Forward Totals
Many reports require that a page total be maintained throughout the report output and be
displayed at the beginning and end of each page. These totals are known as broughtforward and carried-forward totals. Note: The totaling for the brought-forward and
carried-forward fields is performed in the PDF-formatting layer. Therefore this feature is
not available for other outputs types: HTML, RTF, Excel.
To display the brought-forward total at the top of each page (except the first), use the
following syntax:
<xdofo:inline-total
display condition="exceptfirst"
name="InvAmt">
Brought Forward:
<xdofo:show-brought-forward
name="InvAmt"
format="99G999G999D00"/>
</xdofo:inline-total>
The following table describes the elements in the brought-forward syntax:
Code Element
Description and Usage
inline-total
This element has two properties:
name - name of the variable you declared for the field.
display-condition - sets the display condition. This is an
optional property that takes one of the following values:
first - the contents appear only on the first page
last - the contents appear only on the last page
exceptfirst - contents appear on all pages except first
exceptlast - contents appear on all pages except last
everytime - (default) contents appear on every page
In this example, display-condition is set to exceptfirst
to prevent the value from appearing on the first page
where the value would be zero.
Brought Forward
This string is optional and will display as the field name on
the report.
show-brought-forward
Shows the value on the page. It has the following two
properties: name - the name of the field to show. In this case,
InvAmt. This property is mandatory.
format - the Oracle number format to apply to the value at
run time. This property is optional. For more information
about number formats, see Number and Date Formatting.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 34

Page-Level Calculations (continued)


Insert the brought-forward object at the top of the template where you want the broughtforward total to appear. If you place it in the body of the template, you can insert the
syntax in a form field. If you want the brought-forward total to appear in the header, you
must insert the full code string into the header because Microsoft Word does not support
form fields in header or footer regions.
However, you can alternatively use the Header/Footer Template Technique which allows
you to enter your header and footer content within the body of the template and then
simply include a call for this content in the header or footer region. This can simplify the
look of your template if you have many or complex objects contained in your header or
footer regions. See Header and Footer Template for details.
Place the carried-forward object at the bottom of your template where you want the total
to display. The carried-forward object for our example is as follows:
<xdofo:inline-total
display condition="exceptlast"
name="InvAmt">
Carried Forward:
<xdofo:show-carry-forward
name="InvAmt"
format="99G999G999D00"/>
</xdofo:inline-total>

y
m

Note the following differences with the brought-forward object:


The display-condition is set to exceptlast so that the carried-forward total will
display on every page except the last page.
The display string is Carried Forward.
The show-carry-forward element is used to show the carried-forward value. It has
the same properties as brought-carried-forward, described above.
You are not limited to a single value in your template. You can create multiple broughtforward and carried-forward objects in your template pointing to various numeric
elements in your data.
Running Totals
To create the Running Total field, define a variable to track the total and initialize it to 0.

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 35

Data Handling
Oracle BI Publisher supports the use of the following
types of data handling:
Sorting
Regrouping

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Data Handling
Sorting
You can sort a group by any element within the group. Insert the following syntax within the
group tags:
<?sort:element name?>

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

To sort the example by Supplier (VENDOR_NAME), enter the following after the <?foreach:G_VENDOR_NAME?> tag:
<?sort:VENDOR_NAME?>
To sort a group by multiple fields, just insert the sort syntax after the primary sort field.
To sort by Supplier and then by Invoice Number, enter the following:
<?sort:VENDOR_NAME?> <?sort:INVOICE_NUM?>

e
l
c

Regrouping the XML Data


The RTF template supports the XSL 2.0 for-each-group standard that allows you to regroup
XML data into hierarchies that are not present in the original data. With this feature, your
template does not have to follow the hierarchy of the source XML file. You are thus no
longer limited by the structure of your data source.

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 36

Variables, Parameters, and Properties


Oracle BI Publisher supports the use of the following
features:
Using variables
Defining parameters
Setting configuration properties in a template

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Variables, Parameters, and Properties


Using Variables
Updateable variables differ from standard XSL variables <xsl:variable> in that they
are updateable during the template application to the XML data. This allows you to create
many new features in your templates that require updateable variables. The variables use a
set and get approach for assigning, updating, and retrieving values. Use the following
syntax to declare/set a variable value:
<?xdoxslt:set_variable($_XDOCTX, variable name, value)?>

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Use the following syntax to retrieve a variable value:


<?xdoxslt:get_variable($_XDOCTX, variable name)?>
You can use this method to perform calculations, as in the following example:
<?xdoxslt:set_variable($_XDOCTX, x,
xdoxslt:get_variable($_XDOCTX, x + 1)?>

e
l
c

a
r
O

This sets the value of variable x to its original value plus 1, much like using "x = x +
1". The $_XDOCTX specifies the global document context for the variables. In a
multithreaded environment, there may be many transformations occurring at the same time,
and thus the variable must be assigned to a single transformation.
11i Oracle XML Publisher Fundamentals (NAMER) 7 - 37

Variables, Parameters, and Properties (continued)


Defining Parameters
You can pass run-time parameter values into your template. These can then be referenced
throughout the template to support many functions. For example, you can filter data in the
template, use a value in a conditional formatting block, or pass property values (such as
security settings) into the final document.
Note: The Oracle Applications concurrent manager does not support passing parameter
values into the template. The parameters must be passed programmatically using the API
as follows.
Using a parameter in a template
Declare the parameter in the template. Use the following syntax to declare the
parameter:
<xsl:param name="PARAMETERNAME" select="DEFAULT"
xdofo:ctx="begin"/>
Where PARAMETERNAME is the name of the parameter
DEFAULT is the default value for the parameter (the
select statement is optional)
xdofo:ctx="begin" is a required string to push the
parameter declaration to the top of the template at
run time so that it can be referred to globally in
the template. The syntax must be declared in the
Help Text field of a form field. The form field can
be placed anywhere in the template.
Refer to the parameter in the template by prefixing the name with a "$" character.
For example, if you declare the parameter name to be "InvThresh", then
reference the value using "$InvThresh".
At run time, pass the parameter to the Oracle BI Publisher engine programmatically.
Prior to calling either the FOProcessor API (Core) or the TemplateHelper API (EBusiness Suite) create a Properties class and assign a property to it for the parameter
value as follows:
Properties prop = new Properties();
prop.put("xslt.InvThresh", "1000");

y
m

e
d
a

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

For more information, see the Calling Oracle BI Publisher APIs chapter in the BI
Publisher Users Guide.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 38

Variables, Parameters, and Properties (continued)


Setting Properties
Oracle BI Publisher properties that are available in the Oracle BI Publisher Configuration
file can alternatively be embedded into the RTF template. The properties set in the
template are resolved at run time by the Oracle BI Publisher engine. You can either hardcode the values in the template or embed the values in the incoming XML data.
Embedding the properties in the template avoids the use of the configuration file.
Note: See the Administration chapter in the BI Publisher Users Guide for more
information about the Oracle BI Publisher configuration file and the available properties.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 39

Advanced Design Options


Oracle BI Publisher supports the use of the following
advanced report layout features:
Batch reports
Cross-tab support
Dynamic data columns
Defining columns to repeat across pages
Number and date formatting
Calendar and time-zone support
Using external fonts
Advanced design options

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Advanced Design Options


If you have more complex design requirements, Oracle BI Publisher supports the use of XSL
and XSL-FO elements, and has also extended a set of SQL functions. RTF templates offer
extremely powerful layout options using Oracle BI Publishers syntax. However, because
the underlying technology is based on open W3C standards, such as XSL and XPATH, you
are not limited by the functionality described in this course. You can fully utilize the layout
and data manipulation features available in these technologies.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Note: The Advanced Report Layout features are covered in Chapter 2 of the BI Publisher
Users Guide.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 40

Summary
In this module, you should have learned how to
describe and use advanced RTF template techniques.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 41

Practice 7: Overview
This practice covers the following topics:
Creating an RFT template
Loading the XML sample data
Combining the suppliers with their invoices
Adding a supplier invoice total
Summarizing the taxes and grand total
Adding headers and footers

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 42

Challenge Practice (7-7): Overview


This optional practice covers the following topics:
Creating an Employee Salary report
Inserting additional form fields into the template
Adding a Total column
Including balance information
Previewing and saving the template

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 7 - 43

y
m

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Other Templates

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to
describe the following features of Oracle BI Publisher:
The basics of PDF templates
The advanced capabilities of PDF templates
The basics of eText templates

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 2

PDF Template Overview


You can take any existing PDF document and apply
Oracle BI Publisher markup. You can obtain the initial
source PDF document in the following ways:
Design the layout of your template using any
application that generates documents convertible
to PDF.
Print the document using Adobe Acrobat Distiller.
Scan a paper document to PDF.
Download a PDF document from a third-party Web
site.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

PDF Template Overview


If you are designing the layout, note that once you have converted to PDF, your layout is
treated like a set background. When you mark up the template, you draw fields on top of this
background. To edit the layout, you must edit your original document and then convert back
to PDF.
For this reason, the PDF template is not recommended for documents requiring frequent
updates to the layout. However, it is appropriate for forms which have a fixed layout, such
as invoices or purchase orders.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Note: Further information about creating eText Templates can be found in the Creating an
PDF Template chapter of the BI Publisher Users Guide.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 3

Supported Modes

Oracle BI Publisher supports Adobe Acrobat 5.0


(PDF Specification 1.4).
If you are using Adobe Acrobat 6.0 (or later), use
the Reduce File Size option to save the file so that
it is compatible with Adobe Acrobat 5.0.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 4

Adding Markup to the Template Layout


for Adobe Acrobat Users

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Adding Markup to the Template Layout for Adobe Acrobat Users


After you have converted your document to PDF, you define form fields that will display the
data from the XML input file. These form fields are placeholders for the data. The process
of associating the XML data to the PDF template is the same as the process for the RTF
template.
When you draw the form fields in Adobe Acrobat, you are drawing them on top of the
layout that you designed. There is not a relationship between the design elements on your
template and the form fields. You therefore must place the fields exactly where you want the
data to display on the template.
The markup procedures for Adobe Acrobat 5.0 and 6.0 (or later) are slightly different. These
procedures are outlined on the next page.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 5

Adding Markup to the Template Layout for Adobe Acrobat Users (continued)
After the PDF conversion, the following procedure has to be followed:
Adobe Acrobat 5.0
Select Form Tool from the toolbar.
Draw a form field box in the position on the template where you want the field to
display.
In the Name field of the Field Properties dialog box, enter the placeholder name which
must match the XML source field name.
Select Text from the Type drop-down list.
You can use the Field Properties dialog box to set other attributes such as enforce
maximum character size, field data type, data type validation, visibility, and
formatting.
Adobe Acrobat 6.0 (or later) Users
Select Text Field Tool from the Forms toolbar.
Draw a form field box in the position on the template where you want the field to
display. Drawing the field opens the Text Field Properties dialog box.
On the General tab, enter a name for the placeholder in the Name field, which must
match your XML source.
You can use the Text Field Properties dialog box to set other attributes for the
placeholder. For example, enforce maximum character size, set field data type, data
type validation, visibility, and formatting.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 6

Supported Field Properties Options

Appearance
Border settings: Color, background, width, style
Text settings: Color, font, size
Common properties (General in 6.0): Read-only,
required, visible/hidden, orientation (in degrees)
Border style

Options tab
Multi-line
Scrolling text

Format tab: Number category options only


Calculate tab: All calculation functions

Copyright 2007, Oracle. All rights reserved.

e
d
a

y
m

c
A

Supported Field Properties Options


BI Publisher supports the options listed above, available from the Field Properties dialog
box. For more information about these options, see the Adobe Acrobat documentation.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 7

Creating a Check Box


A check box is used to present options from which
more than one can be selected. Each check box
represents a different data element. You define the
value that will cause the check box to display as
checked.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a Check Box


A certain form contains a check box listing of automobile options such as Power Windows,
Sunroof, and Alloy Wheels. Each of these represents a different element from the XML file.
If the XML file contains a value of Y for any of these fields, you want the check box to
display as checked. All or none of these options may be selected. To create the check box:
Acrobat 5.0 Users
1. Draw the form field.
2. In the Field Properties dialog box, enter a Name for the field.
3. Select Check Box from the Type drop down list.
4. Select the Options tab.
5. In the Export Value field enter the value that the XML data field should match to
enable the checked state. For the example, enter Y for each check box field.
Acrobat 6.0 (and later) Users
1. Select the Check Box Tool from the Forms Toolbar.
2. Draw the check box field in the desired position.
3. On the General tab of the Check Box Properties dialog box, enter a Name for the field.
4. Select the Options tab.
5. In the Export Value field enter the value that the XML data field should match to
enable the checked state. For the example, enter Y for each check box field.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 8

Creating a Radio Button Group


A radio button group is used to display options from
which only one can be selected.

Shipping Method
Standard
Overnight

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a Radio Button Group


Acrobat 5.0 Users:
1. Draw the form field.
2. On the Field Properties dialog box, enter a Name for the field. Each radio button can
be named differently, but must be mapped to the same XML data field.
3. Select Radio Button from the Type drop down list.
4. Select the Options tab.
5. In the Export Value field enter the value that the XML data field should match to
enable the on state. For the example above, enter Standard for the field labeled
Standard. Enter Overnight for the field labeled Overnight.
Acrobat 6.0 (and later) Users:
1. Select the Radio Button Tool from the Forms Toolbar.
2. Draw the form field in the position desired on the template.
3. On the General tab of the Radio Button Properties dialog box, enter a Name for the
field. Each radio button can be named differently, but must be mapped to the same
XML data field.
4. Select the Options tab.
5. In the Export Value field enter the value that the XML data field should match to
enable the on state.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 9

Defining Groups of Repeating Fields

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Defining Groups of Repeating Fields


In the PDF template, you explicitly define the area on the page that will contain the
repeating fields. For example, on the purchase order template, the repeating fields should
display in the block of space between the Item header row and the Total field.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Define the area to contain the group of repeating fields:


1. Insert a form field at the beginning of the area that is to contain the group. (Acrobat 6.0
users should select Text Field Tool, then draw the form field.)
2. In the Name field of the Field Properties window, enter any unique name you choose.
This field is not mapped.
3. Acrobat 5.0 users: Select Text from the Type
drop-down list.
4. In the Short Description field (Acrobat 5.0) or the Tooltip field (Acrobat 6.0) of the
Field Properties window, enter the following syntax:
<?rep_field="BODY_START"?>
5. Define the end of the group area by inserting a form field at the end of the area that is
to contain the group.
6. In the Name field of the Field Properties window, enter any unique name you choose.
This field is not mapped. Note that the name you assign to this field must be different
from the name you assigned to the <?rep_field="BODY_START"?> field.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 10

Defining Groups of Repeating Fields (continued)


7. Acrobat 5.0 users: Select Text from the Type
drop-down list.
8. In the Short Description field (Acrobat 5.0) or the Tooltip field (Acrobat 6.0) of the
Field Properties window, enter the following syntax:
<?rep_field="BODY_END"?>
To define a group of repeating fields:
1. Insert a placeholder for the first element of the group.
2. For each element in the group, enter the following syntax in the Short Description field
(Acrobat 5.0) or the Tooltip field (Acrobat 6.0): <?rep_field="T1_Gn"?> where
n is the row number of the item in the template.
Note: The placement of this field in relationship to the BODY_START tag defines the
distance between the repeating rows for each occurrence.
For example, the group in the sample report is laid out in three rows:
For the fields belonging to the row that begins with POL_ITEM_DESCRIPTION,
enter <?rep_field="T1_G1"?>.
For the fields belonging to the row that begins with C_FLEX_ITEM_DISP, enter
<?rep_field="T1_G2"?>.
For the fields belonging to the row that begins with C_SHIP_TO_ADDRESS, enter
<?rep_field="T1_G3"?>.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 11

Adding Page Numbers


To add page numbers, define a field in the template
where you want the page number to appear and then
enter an initial value in that field as follows:
1. Decide the position on the template where you
want the page number to be displayed.
2. Create a placeholder field called @pagenum@.
3. Enter a starting value for the page number in the
Default field. If the XML data includes a value for
this field, the start value assigned in the template
will be overridden. If no start value is assigned,
it will default to 1.

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 12

Adding Page Breaks


You can define a page break in your template to occur
after a repeatable field.
To insert a page break after the occurrence of a
specific field, add the following to the syntax in
the Short Description field of the Field Properties
dialog box (use the Tooltip field for Acrobat 6.0):
page_break="yes"

Example:
<?rep_field="T1_G3", page_break="yes"?>
Note: For the break to occur, the field must be
populated with data from the XML source.

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 13

Performing Calculations
Adobe Acrobat provides a calculation function in the
Field Properties dialog box. To create a field to display
a calculated total on your report:
1. Create a text field to display the calculated total.
Give the field any name you choose.
2. In the Field Properties dialog box, click the Format
tab.
3. Select Number from the Category list.
4. Click the Calculate tab.
5. Select the option button next to Value is the
operation of the following fields:
6. Select Sum from the drop-down list.
7. Click the Pick button, and then select the fields
that you want totaled.
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 14

Run-Time Behavior
Placement of repeating fields:
The placement, spacing, and alignment of fields
that you create in the template are independent of
the underlying form layout.
At run time, Oracle BI Publisher places each
repeating row of data according to calculations
performed on the placement of the rows of created
fields.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Run-Time Behavior
Placement of Repeating Fields
As already noted, the placement, spacing, and alignment of fields that you create on the
template are independent of the underlying form layout. At run time, BI Publisher places
each repeating row of data according to calculations performed on the placement of the rows
of fields that you created, as follows:
First occurrence
The first row of repeating fields will display exactly where you have placed them on the
template.
Second occurrence, single row
To place the second occurrence of the group, BI Publisher calculates the distance between
the BODY_START tag and the first field of the first occurrence. The first field of the second
occurrence of the group will be placed this calculated distance below the first occurrence.
Second occurrence, multiple rows
If the first group contains multiple rows, the second occurrence of the group will be placed
the calculated distance below the last row of the first occurrence. The distance between the
rows within the group will be maintained as defined in the first occurrence.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 15

Downloaded PDFs

There are many PDF forms available online that


you may want to use as templates for your report
data
Example: Government forms that your company is
required to submit

You can use these downloaded PDF files as your


report templates, supplying the XML data at run
time to fill the report out.
Some of these forms already have form fields
defined; some do not. If the form fields are not
already defined in the downloaded PDF, you must
create them.
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 16

Using Downloaded PDFs with Form Fields


1. Download the PDF file to your local system.
2. Open the file in Adobe Acrobat.
3. Select Text Field Tool (Acrobat 6.0 users) or the Form
Tool (Acrobat 5.0 users). This will highlight text fields
that have already been defined.
4. To map the existing form fields to the data from your
incoming XML file, you must rename the fields to match
the element names in your XML file.
5. Open the text form field Properties dialog box either by
double-clicking the field, or by selecting the field and
then selecting Properties from the shortcut menu.
6. In the Name field, enter the element name from your
input XML source.
7. Repeat for all fields that you want populated by your
data file.
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 17

eText Templates
An eText template is:
RTF-based template used to generate text output
for Electronic Funds Transfer (EFT) and Electronic
Data Interchange (EDI)
Applied at run time by Oracle BI Publisher to an
input XML data file to create an output text file that
can be transmitted to a bank or other customer

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

eText Templates
An eText template is an RTF-based template used to generate text output for Electronic
Funds Transfer (EFT) and Electronic Data Interchange (EDI). At run time, BI Publisher
applies this template to an input XML data file to create an output text file that can be
transmitted to a bank or other customer. Because the output is intended for electronic
communication, the eText templates must follow very specific format instructions for exact
placement of data.
Note: An EFT is an electronic transmission of financial data and payments to banks in
a specific fixed-position format flat file (text).
EDI is similar to EFT, except it is not only limited to the transmission of payment
information to banks. It is often used as a method of exchanging business documents,
such as purchase orders and invoices, between companies. EDI data is delimiter-based
and also transmitted as a flat file (text).
Files in these formats are transmitted as flat files, rather than printed on paper. The length of
a record is often several hundred characters and, therefore, difficult to lay out on standard
size paper.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 18

eText Templates (continued)


To accommodate the record length, the EFT and EDI templates are designed using tables.
Each record is represented by a table. Each row in a table corresponds to a field in a
record. The columns of the table specify the position, length, and value of the field.
These formats can also require special handling of the data from the input XML file. This
special handling can be on a global level (for example, character replacement and
sequencing) or on a record level (for example, sorting). Commands to perform these
functions are declared in command rows. Global-level commands are declared in setup
tables.
At run time, Oracle BI Publisher constructs the output file according to the setup
commands and layout specifications in the tables.
Note: Further information about creating eText Templates can be found in the Creating
an eText Template chapter of the BI Publisher Users Guide.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 19

Structure of eText Templates

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Structure of eText Templates


There are two types of eText templates, fixed positionbased (EFT templates) and delimiterbased (EDI templates). The templates are composed of a series of tables. The tables define
layout, setup commands, and data field definitions. The required data description columns
for the two types of templates vary, but the commands and functions available are the same.
A table can contain just commands, or it can contain commands and data fields.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 20

Row Types

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Row Types
Command rows are used to specify commands in the template. Command rows always have
two columnscommand name and command parameter. Command rows do not have
column headings. The commands control the overall setup and record structures of the
template.
Blank rows can be inserted anywhere in a table to improve readability. Most often they are
used in the setup table, between commands. Blank rows are ignored by Oracle BI Publisher
when the template is parsed.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Data column headers specify the column headings for the data fields (such as Position,
Length, Format, Padding, and Comments). A column header row usually follows the LEVEL
command in a table (or the sorting command, if one is used). The column header row must
come before any data rows in the table. Additional empty column header rows can be
inserted at any position in a table to improve readability. The empty rows will be ignored at
run time.
Data rows contain the data fields to correspond to the column header rows.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 21

Constructing Data Tables

Data tables contain a combination of command


rows and data field rows.
Each data table must begin with a LEVEL
command row that specifies its XML element.
Each record must begin with a NEW RECORD
command that specifies the start of a new record,
and the end of a previous record (if any).
The required columns for the data fields vary
depending on the template type.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 22

Command Rows
Command rows always have two columns:
Command name
Command parameter
The supported commands are:
LEVEL
NEW RECORD
SORT ASCENDING
SORT DESCENDING
DISPLAY CONDITION

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Command Rows
Level Command
The level command associates a table with an XML element. The parameter for the level
command is an XML element. The level will be printed once for each instance the XML
element appears in the data input file.
The level commands define the hierarchy of the template. For example, Payment XML data
extracts are hierarchical. A batch can have multiple child payments, and a payment can have
multiple child invoices. This hierarchy is represented in XML as nested child elements
within a parent element. By associating the tables with XML elements through the level
command, the tables will also have the same hierarchical structure.
Similar to the closing tag of an XML element, the level command has a companion endlevel command. The child tables must be defined between the level and end-level commands
of the table defined for the parent element.
An XML element can be associated with only one level. All the records belonging to a level
must reside in the table of that level or within a nested table belonging to that level. The
end-level command will be specified at the end of the final table.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 23

Command Rows (continued)


New Record Command
The new record command signifies the start of a record and the end of the previous one, if
any. Every record in a template must start with the new record command. The record
continues until the next new record command, or until the end of the table or the end of the
level command.
A record is a construct for the organization of the elements belonging to a level. The record
name is not associated with the XML input file.
A table can contain multiple records, and therefore multiple new record commands. All the
records in a table are at the same hierarchy level. They will be printed in the order in which
they are specified in the table.
Sort Ascending and Sort Descending Commands
Use the sort ascending and sort descending commands to sort the instances of a level. Enter
the elements you want to sort by in a comma-separated list. This is an optional command.
When used, it must come right after the (first) level command and it applies to all records of
the level, even if the records are specified in multiple tables.
Display Condition Command
The display condition command specifies when the enclosed record or data field group
should be displayed. The command parameter is a Boolean expression. When it evaluates to
true, the record or data field group is displayed. Otherwise the record or data field group is
skipped.
The display condition command can be used with either a record or a group of data fields.
When used with a record, the display condition command must follow the new record
command. When used with a group of data fields, the display condition command must
follow a data field row. In this case, the display condition will apply to the rest of the fields
through the end of the record.

y
m

e
d
a

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Consecutive display condition commands are merged as AND conditions. The merged
display conditions apply to the same enclosed record or data field group.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 24

Structure of the Data Rows


The output record data fields are represented in the
template by table rows. In FIXED_POSITION_BASED
templates, each row has the following attributes (or
columns):
Position
Length
Format
Pad
Data
Comments

Copyright 2007, Oracle. All rights reserved.

e
d
a

y
m

c
A

Structure of the Data Rows


The first five columns (listed in the slide) are required and must be declared in the order
stated.
The Comments column is optional and ignored by the system. You can insert additional
information columns if you want; however, all columns after the required ones are ignored.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 25

Structure of the Data Rows


The output record data fields are represented in the
template by table rows. In DELIMITER_BASED
templates, each row has the following attributes (or
columns):
Maximum length
Format
Data
Tag
Comments

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Structure of the Data Rows (continued)


The first three columns are required and must be declared in the order stated.
The Comments column is optional and ignored by the system. You can insert additional
information columns if you want, as all columns after the required ones are ignored.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 26

Setup Command Tables


A template always begins with a table that defines
global attributes and program elements. The setup
commands are:
Template type
Output character set
New record character
Invalid characters
Replace characters
Define level
Define sequence
Define concatenation
Copyright 2007, Oracle. All rights reserved.

e
d
a

y
m

c
A

Setup Command Tables


A template always begins with a table that specifies the setup commands. The setup
commands define global attributes (such as template type and output character set) and
program elements (such as sequencing and concatenation).

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 27

Summarizing eText Templates


eText templates are very specific to the application
(EDI or EFT) and are rigidly and tightly controlled.
Because of this, eText template creation is not trivial.
The Oracle BI Publisher Users Guide should be
consulted.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 28

Summary
In this lesson, you should have learned how to
describe the following features of Oracle BI Publisher:
The basics of PDF templates
The advanced capabilities of PDF templates
The basics of eText templates

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 8 - 29

y
m

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Installing Oracle BI Publisher Enterprise

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to do
the following:
Install Oracle BI Publisher Enterprise 5.6.2
Install Oracle BI Publisher 5.6.2 patches for an
Oracle E-Business Suite instance

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 2

Oracle BI Publisher Enterprise 5.6.2

At present, the latest Oracle BI Publisher downloads


can be obtained from:
http://www.oracle.com/technology/products/xmlpublisher/index.html
Be certain to check the notes; versions may change
between this course and the latest version available.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 3

Instructions

Always read the instructions that accompany the


download.
Follow those instructions precisely. Most
installation and/or patching problems occur when
instructions are not followed.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 4

System Requirements

A Java Runtime Environment (JRE/JDK) of version


1.4 or later
A J2EE-based application server Oracle OC4J
10.1.2 or 10.1.3 or Apache Tomcat 5.0
Oracle9i Database or Oracle Database 10g
(optional, but required for the scheduler database)
Microsoft Internet Explorer 6.0 or Mozilla Firefox
1.0 or later

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 5

Installation Steps: Windows


1. Unzip the files to an temporary directory (for
example, E:\TEMP\XMLP_SERVER).
2. Run the install\setup.exe executable.
3. Start Oracle BI Publisher server using the
xmlpserver\xmlpserverstart.bat file.
4. The installer uses the first free port between 15101
and 15110 for Oracle BI Publisher Enterprise.
The installer will provide you with the server URL
in the last dialog box of the installation. This
information is also stored in the
\xmlpserver\setupinfo.txt file.

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Note
You will see several references to XML Publisher. Oracle BI Publisher 10g was originally
named XML Publisher. Throughout this course, you can treat those two names as
interchangeable. This is especially noticeable in directory paths that have yet to be changed.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 6

Installation Steps: Windows


5. Typically, the URL looks like the following:
http://localhost:15101/xmlpserver
6. Open a compatible browser pointing to this URL.
7. Log in as user admin with password admin.
8. Important: Change the admin password under (H)
Preferences > Accounts.
9. Continue under Database Configuration.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 7

Installation Steps: Linux


1. Run the runInstaller script.
2. You can start Oracle BI Publisher server using the
/xmlpserver/xmlpserverstart.sh file in the
ORACLE_HOME directory (typically $ORACLE_HOME
or /oraclehomes).
3. The installer uses the first free port between 15101
and 15110 for Oracle BI Publisher Enterprise.
The installer will provide you with the server URL
in the last dialog box of the installation. This
information is also stored in the
/xmlpserver/setupinfo.txt file under the
Oracle Home directory.
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 8

Installation Steps: Linux


4. Typically, the URL looks like the following:
http://localhost:15101/xmlpserver
5. Open a compatible browser pointing to this URL.
6. Log in as user admin with password admin to set
up your system.
7. Important: Change the admin password under (H)
Preferences > Accounts.
8. Continue under Database Configuration.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 9

Installation Steps:
Database Configuration
1. Create a new database user/schema (for example,
BIP with password welcome).
2. From the \manual\SQL_Scripts SQL script
directory, run the tables_oracle.sql script with
SQL Plus:
sqlplus user/password @tables_oracles.sql
where user/password are replaced with correct
values. For example:
sqlplus BIP/welcome @tables_oracles.sql

Note: This script includes the quartz1.5.1/tables_oracles.sql script that sets up


the database for the Quartz scheduler.

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Installation Steps: Database Configuration


The database configuration is required to send or schedule reports.
The following is the SQL statement that you need for creating the BIP user identified in the
slide:

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

CREATE USER BIP

IDENTIFIED BY WELCOME

DEFAULT TABLESPACE USERS

TEMPORARY TABLESPACE TEMP


QUOTA UNLIMITED ON USERS;
GRANT CREATE SESSION TO BIP;

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 10

Installation Steps: Test


1. Enter http://hostname:15101/xmlpserver in
your browser to see the Welcome page.
2. The sample reports require that the data source
xmlpdemo be set up correctly. Perform the
following steps:
a.
b.
c.
d.

Click the Admin tab.


Select JDBC Connection in the Data Sources section.
Select the connection with the name xmlpdemo.
Change the URL to point to an Oracle 10g database with
the unlocked BIP user.
e. Click the Test Connection button to confirm.
f. Select Apply to save your changes.

3. Navigate to the Reports tab and view the demo


reports.
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Installation Steps: Test


Why Use Port 15101?
By default, the Oracle BI Publisher installation uses the first free port between 15101 and
15110.
The installer will provide you with the server URL in the last dialog box of the Installation
Wizard. The information is also stored in the /xmlpserver/setupinfo.txt file
under the Oracle Home directory.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 11

Oracle BI Publisher 5.6.2


on Oracle E-Business Suite

Before you begin, obtain the About document


from MetaLink. In this version, it is titled:
About Oracle XML Publisher Core Rollup Patch
5.6.2 Note: 367394.1
After reading the About document, download all
the patches needed for your installation. For
example, for this installation on E-Business Suite,
you need the following:
Patch 5097966 (XMLP Core Rollup Patch)
Patch 4905678 (XMLP UI Components; see Note
357301.1 for installation About instructions)
Patch 5027437 (XMLP Desktop)
Any other patches indicated
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 12

Oracle BI Publisher 5.6.2


on Oracle E-Business Suite:
Pre-Installation Steps

For system administrators:


Ensure that business users receive a copy of the
MetaLink Note and review it.

For business users:


Review the MetaLink Note to understand its impact
on your needs.

Preinstallation Steps:
Shut down all middle-tier processes.
Apply all applicable AD and additional prerequisite
patches.

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Pre-Installation Steps
As of the writing of this course, the following patches would need to be applied prior to
applying the XML Publisher 5.6.2 patch:

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

The following patches are required prior to applying Oracle XML Publisher Core Rollup
Patch 5.6.2.
4337683 - AD Patch 11i.AD.2.
4104924 - TXK (FND) AutoConfig Template Rollup Patch K (July 2005)
Additional requirements:
1674407 - Update JavaMail API to version 1.2
3412795 - ADSPLICE Patch for XDO

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 13

Oracle BI Publisher 5.6.2


on Oracle E-Business Suite: Downloading,
Unzipping, and Applying the Patch
1. At this time, the latest XML Publisher 5.6.2 patch is
5097966.
2. Download this patch (or a later version as advised)
for your operating system.
3. Unzip the patch.
4. Apply the driver file u5097966.drv on all
Application tier server nodes.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 14

Oracle BI Publisher 5.6.2


on Oracle E-Business Suite:
Post-Installation Steps
1. Check MetaLink for any recommended patches.
2. Generate message files using adadmin.
3. Restart the middle-tier processes.
4. If upgrading from an earlier version, run the XML
Publisher Template Re-Generator concurrent
program.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Post-installation Steps
Generate Message Files
Generate message files using the AD Administration utility (adadmin). Within adadmin,
choose the Generate Applications Files menu option and choose the Generate message files
task. For more information, refer to Generating Applications Files in Oracle Applications
Maintenance Utilities, Release 11i.
XML Publisher Re-Generator Concurrent Program
If you are upgrading from an earlier version of XML Publisher, you must run the XML
Publisher Template Re-Generator concurrent program. Use Standard Request Submission to
submit this request from the XML Publisher Administrator responsibility. The request will
prompt you for the following parameter:
Regeneration Criteria
- Select Outdated to regenerate only outdated templates.
- Select All to regenerate all templates.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 15

Windows Installation Startup

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 16

Windows Installation Welcome

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 17

Specify Home Details

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 18

Installation Summary

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 19

Installation in Progress

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 20

Installation Complete

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 21

Exit Installer

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 22

Create a Desktop Shortcut

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 23

Browse for the Server Startup

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 24

Select the Server Startup Script

y
m

Copyright 2007, Oracle. All rights reserved.

Select the Server Startup Script


D:\OraHome_1\xmlpserver\xmlpserverstart.bat

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 25

Name the Shortcut

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 26

Shortcuts Created

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Shortcuts Created
Create a second shortcut for D:\OraHome_1\xmlpserver\xmlpserverstop.bat, and
name it XMLP Server Stop.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 27

Start the Server

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Start the Server


The server startup script may take a while to get to this stage, so be patient.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 28

Confirm Server Is Started

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Confirm Server Is Started


Open your browser and go to http://localhost:15101/xmlpserver.
Log in as user admin with password admin.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 29

Startup Confirmed

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 30

Summary
In this lesson, you should have learned how to:
Install Oracle BI Publisher Enterprise 5.6.2
Install Oracle BI Publisher 5.6.2 patches for an
Oracle E-Business Suite instance

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 31

Practice 9: Overview
This practice covers the topic of installing Oracle BI
Publisher Enterprise.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 9 - 32

Oracle BI Publisher Enterprise


Administration

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to
administer Oracle BI Publisher Enterprise.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 2

Administration Options
Using the Administration interface, you can do the
following:
Set up:

Data sources
Users and roles
Delivery options
Server configuration file

Refresh the metadata

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 3

Logging In to Enterprise

y
m

Copyright 2007, Oracle. All rights reserved.

Logging In to Enterprise
The default username and password are admin/admin.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

By default, the Oracle BI Publisher Enterprise server looks for the first available port in the
range 15101 to 15110.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 4

BI Publisher Enterprise Home Page

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

BI Publisher Enterprise Home Page


This is the default installation setting of the server.
The BI Publisher Enterprise Home Page displays two tabs. Reports, the first tab, displays the
folders and reports associated with the user.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 5

Administration Settings

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Administration Settings
The BI Publisher Enterprise Home Page displays two tabs. Admin, the second tab, displays
the activities available to the BI Publisher Administrator.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

These activities will be covered in the following pages.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 6

Data Sources

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Data Sources
Click one of the two Data Source links to create a connection to a data source.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 7

Setting Data Sources: JDBC

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Data Sources: JDBC


JDBC (Java Database Connectivity) is an object-oriented API that provides a common
means for accessing a relational database. So the default assumption is that the connection
will be to an Oracle 10g database; the reality is that it can connect to any database that
supports the JDBC API.
Click Add Connection to add a data source. This is demonstrated on the next page.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 8

Setting the JDBC Connection Information

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting the JDBC Connection Information


To create a data source with a JDBC Connection, fill in the following information:
Data Source Name: A display name for the data source
URL:
- For Oracle databases, the connect string will have the following format:
jdbc:oracle:thin:@server:port:sid
- For Microsoft SQL Server, the connect string will have the following format:
jdbc:sqlserver://server
Username: The database username required to access the data source
Password: The password associated with the username
Database Driver class:
- For Oracle databases:
oracle.jdbc.driver.OracleDriver
- For Microsoft SQL Server:
com.microsoft.jdbc.sqlserver.SQLServerDriver

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 9

Testing the JDBC Connection

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Testing the JDBC Connection


To test the JDBC connection, select Test Connection. If the test is successful, the
confirmation message Connection established successfully is displayed. If a connection
error occurs, the message Could not establish connection is displayed.
If your test is successful, click Apply to save your changes.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 10

Setting Data Sources: JNDI

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Data Sources: JNDI


Java Naming and Directory Interface (JNDI) is an object-oriented API that provides a
common means for accessing different name and directory servers, including CORBA, Java
RMI, EJB, and directory services like LDAP and NIS+.
Click Add Connection to add a data source.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 11

Security Center

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Security Center
This option is used to create users and roles for your standalone BI Publisher Enterprise
installation.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Users: Controls who can run reports


Roles: Determines what folders a user has; each folder controls what reports a user can run.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 12

Users and Roles

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Users and Roles


A user is granted one or multiple roles. A role defines a users access to folders and
functions. A role can be assigned one or multiple folders to which access is granted. Reports
are contained within the folders. You can create a hierarchy of roles by assigning roles to
other roles. In this way, the privileges of multiple roles can be applied to higher-level roles.
The graphic in the slide shows an example of the hierarchy structure of User, Role, and
Folder.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 13

Functional Roles

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Functional Roles
Oracle BI Publisher provides five functional roles for granting access to specific tasks within
the application. Assign these roles to users based on their need to perform the associated
tasks. These roles cannot be updated or deleted.
The table in the slide shows the privileges granted to each functional role.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 14

Setting Up Users and Roles

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Up Users and Roles


There are two options for setting up users and roles:
Set up users and roles in the Oracle BI Publisher Enterprise Security Center.
Integrate Oracle BI Publisher Enterprise with an existing LDAP server.
Adding a User
From the Security Center, click the Users tab. This invokes the Security Center Users
page. Here you see the list of existing users.
Select Create User.
Add the username and password for the user.
Select Apply.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Updating a User
From the Security Center, click the Users tab. This invokes the Security Center Users
page. Here you see the list of existing users.
Select the username. You can update both the username and the password.
Select Apply.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 15

Setting Up Users and Roles (continued)


Adding a Role to a User
From the Security Center, select the Users tab. This invokes the Security Center Users
page. Here you see the list of existing users.
Click the Assign Roles for the user.
From the Assign Roles page, select the role from the Available Roles list and then
select the Move shuttle button to move the role to the Assigned Roles list. When done
with assigning all roles, select Apply.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 16

Setting Up Roles

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Up Roles
Creating a Role
From 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.
Select Create Role.
Enter a Role Name and Description, and select Apply.
Adding a Folder to a Role
From 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.
Click Add Folders.
Select the desired folder from the Available Folders list and use the Move shuttle
button to move it to the Allowed Folders list.
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.
Select Apply when done.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 17

Setting Up Roles (continued)


Adding a Role to a Role
From the Security Center, select the Roles and Permissions tab. This invokes the
Security Center page. Here you see the list of existing roles and permissions.
Click the Add Roles for the Role.
Select the desired role from the Available Roles list and use the Move shuttle button to
move it to the Included Roles.
Select Apply when done.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 18

Delivery

y
m

Copyright 2007, Oracle. All rights reserved.

Delivery
This allows you to set up your delivery options.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 19

Setting Up Delivery Options: Configuration

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Up Delivery Options: Configuration


On the Admin page, select Configuration.
Enter the following properties:
Temporary Directory: Enter a directory for the delivery server to write temporary
files when in buffering mode.
SSL Certificate File: Enter the location of your Secure Socket Layer Certificate.
Buffering Mode: Select True or False. Buffering mode allows you to redeliver
documents as many times as you want. The delivery system uses temporary files to
buffer documents, if you specify a temporary directory. If you do not specify a
temporary directory, the delivery system uses the temporary memory buffer. It is
recommended that you define a temporary directory.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 20

Setting Up Delivery Options: Printer

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Up Delivery Options: Printer


On the Admin page, select the Printer. This will show the list of servers already added. Click
Add Server.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Enter the Name and Host for the new server.


Note: For optional printer options information, see the next page.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 21

Setting Up Delivery Options: Printer (continued)


Optionally, enter the following fields if appropriate:
General fields: Port and URI
Filter: With this, you can call a conversion utility to convert PDF to Postscript or PDF
to TIFF (for fax) for Windows-based print servers. To specify the filter, pass the native
OS command string with the two placeholders for the input and output file names,
{infile} and {outfile}.
- This is useful especially if you are trying to call IPP printers directly or IPP
printers on Microsoft Internet Information Service (IIS). Unlike Common UNIX
Printing System (CUPS), those print servers do not translate the print file to a
format the printer can understand. Therefore, only limited document formats are
supported. With the filter functionality, you can call any of the native OS
commands to transform the document to the format that the target printer can
understand.
- For example, to transform a PDF document to a Postscript format, enter the
following PDF to PS command in the Filter field:
pdftops {infile} {outfile}
- To call an HP LaserJet printer setup on a Microsoft IIS from Linux, you can set
Ghostscript as a filter to transform the PDF document into the format that the HP
LaserJet can understand. To do this, enter the following Ghostscript command in
the Filter field:
gs -q -dNOPAUSE -dBATCH -sDEVICE=laserjet
sOutputFile={outfile} {infile}
- For fax servers, you can use the filter to transform the file to Tag Image File
Format (TIFF).
- Note that this functionality works only if the Buffering Mode is True and a valid
Temporary Directory is specified. See Delivery Configuration Options for
more information.
Security fields: Username and Password (required); Authentication Type (None,
Basic, Digest) and Encryption Type (None, SSL)
Proxy Server fields: Host, Port, Username, Password, Authentication Type (None,
Basic, Digest)

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 22

Setting Up Delivery Options: Fax

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Up Delivery Options: Fax


On the Admin page, select Fax. This will show the list of servers already added. Click Add
Server.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Enter the Name and Host for the new server.


Optionally, enter the following fields if appropriate:
Port
URI

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 23

Setting Up Delivery Options: WebDAV

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Up Delivery Options: WebDAV


On the Admin page, select the WebDAV. This will show the list of servers already added.
Click Add Server.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Enter the Name and Host for the new server. Optionally, enter the Port.
WebDAV (Web-based Distributed Authoring and Versioning) is a standard promoted by the
Internet Engineering Task Force (IETF) that provides extensions to HTML that allow for
collaborative editing and management of files on remote Web servers. It provides its
features via XML properties for metadata, locking, namespace manipulation, and remote
management of files on the server.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 24

Setting Up Delivery Options: Email or FTP

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Setting Up Delivery Options: EMail or FTP


On the Admin page, select EMail or FTP. This will show the list of servers already
added. Click Add Server.
Enter the Name and Host for the e-mail server.
Optionally, enter the following fields if appropriate:
- General fields: Port
- Security fields: Username and Password required

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 25

System Maintenance

y
m

Copyright 2007, Oracle. All rights reserved.

System Maintenance
Click Refresh Metadata to remove objects from the server.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 26

Refreshing the Metadata

y
m

Copyright 2007, Oracle. All rights reserved.

Refreshing the Metadata


The metadata for this server is kept in the following location:
E:\OraHome_1\xmlpserver\Reports

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

To delete an object from the home page on the Enterprise Edition server, delete the object(s)
from the file system and then refresh the metadata.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 27

Preferences

y
m

Copyright 2007, Oracle. All rights reserved.

Preferences
Click Preference to set the preferences for the server.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 28

General Preferences

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

General Preferences
Use the Preferences page to set up the following:
UI Language
Report Locale
SVG support in HTML
Password
Access the Preferences page by clicking Preferences from any page within the Oracle BI
Publisher Enterprise application.
Set UI Language
The UI language is the language in which your user interface is displayed. The language that
you selected at login will be selected as the default. Choose from the languages that are
available for your installation.
Set Report Locale
A locale is a language and territory combination (for example, English [United States] or
French [Canada]). BI Publisher uses the report locale selection to determine the following:
The template translation to apply
The number formatting and date formatting to apply to the report data

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 29

General Preferences (continued)


Note that a particular report must have an available template translation for the selected
locale. If not, Oracle BI Publisher will apply a locale fallback logic to select the template.
The appropriate number and date formatting will be applied independent of the template
translation.
Enable SVG for HTML
You can choose to have graphics in your HTML reports displayed using scalable vector
graphics (SVG) technology. Your browser may require a plug-in to enable SVG. If so, you
will be prompted to download this plug-in the first time you attempt to view an HTML
graphic with SVG enabled. If you do not wish to use the SVG plug-in, select No.
Set Your Password
To change your password, click the Account tab on the Preferences page. Enter your current
password and then your new password, when prompted.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 30

Summary
In this lesson, you should have learned how to
administer Oracle BI Publisher Enterprise Edition.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 31

Practice 10: Overview


This practice covers the following topics:
Creating a user in BI Publisher Enterprise
Editing the JDBC connection to connect to the
database

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 10 - 32

Using BI Publisher Enterprise

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to do
the following:
Access Oracle BI Publisher Enterprise
View and schedule reports
Create a new report

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 2

Viewing a Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Viewing a Report
From the home page, select the Folder Name or more to view the folder contents.
Select the report name to run the report and view it online.
On the next page, you will see the result of selecting the Employee Salary report from the
HR Manager folder.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 3

Viewing a Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 4

Selecting Report Parameters

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Selecting Report Parameters


You can change the parameters defined for the report. In this case, DEPARTMENT is one
parameter. These parameters are defined as List of Values items for the report when you
define it to the server.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 5

Selecting Parameters

y
m

Copyright 2007, Oracle. All rights reserved.

Selecting Parameters
In this case, EMPLOYEE is the other parameter.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 6

Selecting a Layout

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Selecting a Layout
Oracle BI Publisher allows for the separation of three key elements: the data model, the
layout, and the translation. In this case, a single reportthe Employee Salary reporthas
been defined to seven different layouts that can all be accomplished from the same data
model.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 7

Selecting a Report Format

y
m

Copyright 2007, Oracle. All rights reserved.

Selecting a Report Format


The options are:
HTML
PDF
RTF
EXCEL
XML

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

To see a report in another template and format, select the values from the drop-down lists
and click View.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 8

Exporting the Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Exporting the Report


To export a report:
Select the template (layout) to be used.
Select the format (HTML/PDF/RTF/EXCEL/XML) to be used.
Click Export.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 9

Sending the Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Sending the Report


In the view report window, click Send to open the Destination window. Delivery options
that have been set up via the Administration option are available in this window.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 10

Scheduling the Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Scheduling the Report


To schedule a report:
Select the name of the folder that contains the report to access the Folder view, or select the
report name to View the report. Then click Schedule.
On the Schedule Report page, do the following:
Template: Select the layout template to apply to the report. You can apply one
template per job submission.
Format: Select the output format.
Job Name: Enter a name for your report.
Locale: Select the language-territory combination for the report. This field defaults to
the Report Locale defined in the user preferences.
- Note: A report must have an available template translation for the selected
locale. If not, Oracle BI Publisher will apply a locale fallback logic to select the
template. The appropriate number and date formatting will be applied
independently of the template translation.
Save Data: Select this check box if you want to save the XML data from the report.
Save Output: Select this check box if you want the report output saved. You must
select this option if you want to view your report from the History page.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 11

Scheduling the Report (continued)


If you wish to receive notification by e-mail, enter a comma-separated list of addresses to
send the notification to and select the notification criteria.
Enter the Time criteria.
If you select Run Once, select the Run Date and Run Time.
If you select Run Daily/Weekly select the days of the week, the Run Time, Active
Start Date to begin the recurring job, and the Active End Date to end the recurring
schedule.
If you select Run Monthly, select the month, the day of the month to run the report, the
Run Time, the Active Start Date to begin running the report, and the Active End Date.
To select multiple days of the month to run the report, enter each day separated by a
comma (example: 1,15,28).
Select the Destination mode and enter the appropriate fields for your selection. To deliver
via multiple channels, click the Add Destination button and continue adding destinations as
needed.
If you do not wish to choose any of these destinations, leave this region blank. Select the
Save Output check box in the Job Properties region to view the output from the History
page.
Email: Enter multiple e-mail addresses separated by a comma. Enter any Body text
that you want to include with the report.
Printer: Select the Printer Group and the Printer, enter the Number of copies, and
select Single sided or Double sided (the printer must support duplex printing for this
option to take effect), the optionally select the printer Tray from which to print the
report, and the Pages to print if you do not wish to print the entire report.
Fax: Select the Fax server to deliver the report and enter the Fax number to which to
send the report.
FTP
- FTP Server: Select the server to deliver the report.
- Username: Enter a valid username for the server.
- Password: Enter a valid password for the username.
- Remote Directory: Enter the directory to which to deliver the report file.
- Remote Filename: Enter the name to assign to the report file.
Web Folder
- Web Folder Server: Select the server to deliver the report.
- Username: Enter a valid username for the server.
- Password: Enter a valid password for the username.
- Remote Directory: Enter the directory to which to deliver the report file.
- Remote Filename: Enter the name to assign to the report file.
Select Submit. This will invoke the Schedule and History page, where you can monitor your
report.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 12

Managing Your Scheduled Reports

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Managing Your Scheduled Reports


Navigate to this page by selecting the report folder and then clicking the (H) History link for
the report. Use this page to:
View current schedules for a report
Monitor the status of a submitted report
Delete a scheduled report
Suspend or resume a scheduled report
View the submission details
Viewing Report History
The page displays information about scheduled reports and reports that have already run.
Navigate to this page by selecting the report folder and then clicking the History link for the
report. Use this page to:
View the status of submitted reports
View start and end processing times
Download or view the XML data produced from the report (if you selected Save Data
for the report), or the report document (if you selected Save Output)
View report submission details
You can sort the table of reports by Job Name, Status, Start Date, or End Date by selecting
the column heading.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 13

Using the Online Analyzer

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Using the Online Analyzer


Note: Your system administrator must assign you access to this feature.
The Online Analyzer allows you to create a pivot table of your data. Use the interface to
analyze your report data by dragging and dropping data items into the crosstab structure.
Then quickly rearrange data as desired by dragging items to different row, column, or
summary positions.
You can filter the data displayed in your pivot table by defining page-level data items.
Drag and drop the desired field to the Page item area and then choose from the values that
immediately populate the list.
After selecting all the data items for the table, choose whether to view the Sum, Average, or
Count of the data items.
The following example displays the usage of the Analyzer with a simple Sales Analysis
report:
Select Analyzer from the View Report page.
The Analyzer interface displays the list of data fields on a pane and an empty crosstab
structure on the adjacent pane, as shown in the slide.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 14

Dragging the Page Item

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Dragging the Page Item


To filter by DEPARTMENT NAME, drag the item to the Page Items region, as shown in the
slide.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 15

Dragging the Row Field

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Dragging the Row Field


To add the rows of NAME, drag the item to the Row Field region, as shown in the slide.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 16

Dragging the Column Field

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Dragging the Column Field


To add the columns of MANAGER, drag the item to the Column Field region, as shown in
the slide.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 17

Dragging the Data Item

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Dragging the Data Item


To add the data item of ANNUAL SALARY, drag the item to the Data Items region, as
shown in the slide.
Note that you can potentially calculate the SUM, COUNT, and AVERAGE of the data so
analyzed. It is possible to create situations for which it is not possible to calculate data for
the combinations selected. If that is the case, the server will indicate the error.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 18

Using the Analyzer for Excel

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Using the Analyzer for Excel


Similar to the Online Analyzer, there is also an Analyzer for Excel.
Note: Your system administrator must assign you access to this feature.
Prerequisites
Microsoft .NET Framework 2.0. If it is not installed on your computer, you will be
prompted to download it the first time you use the Analyzer for Excel.
Microsoft Excel 2000 or later

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Features
The Analyzer for Excel allows you to do the following:
Export the results of the report query to an Excel spreadsheet.
Log in to Oracle BI Publisher Enterprise from Excel to refresh your data, apply new
parameters, and apply a template to the report data.
Access and run your reports from an Excel session.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 19

Using the Analyzer for Excel (continued)


Launching the Excel Analyzer
Select Analyzer for Excel from the View report page. You will be prompted to Save or
Open the report .xls file.
When you open the file, select Enable Macros from the Excel dialog box.
Note: You must enable macros to use the Analyzer for Excel.
The report data will render in your Excel application window and the Oracle BI
Publisher menu will appear on your Excel menu bar. Note that the data are the results
of the report query with no template and default filtering applied.
You can now manipulate the data as you wish in Excel. If the report has parameters,
the parameter names will appear at the top of the sheet, but you must log in to apply
new parameter values.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 20

Analyzer for Excel Toolbar

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Analyzer for Excel Toolbar


Using the Oracle BI Publisher Menu
You must log in to enable all the menu commands.
Login: Allows you to log in to the Oracle BI Publisher
Note: If you do not have Microsoft .NET Framework 2.0 installed on your computer, you
will be prompted to download it. Click the URL and follow the instructions on the Microsoft
Web site to download and install .NET. If you do not want to install .NET, click OK to close
the message window.
If this is the first time you have used the Analyzer for Excel, or if you do not have the
latest version of Analyzer for Excel, you will be prompted to install the latest version.
Show Report Parameters: Displays the updateable parameters and available templates
for the report in a toolbar
Analyzer for Excel Toolbar
To update the data, select a new parameter value. Then select Refresh Data to refresh
the data in the current sheet.
To apply a template, select the template and then select Refresh Formatted Data. This
will download the report as HTML into a new worksheet. Select the new worksheet to
see the data with the new template applied.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 21

Analyzer for Excel Toolbar (continued)


Note: The template you select must have HTML as an available output.
To change the parameters from this worksheet, select the new values, select Refresh
Data, and then select Refresh Formatted Data.
Show Report Web Page: Launches the View report page
Browse for Reports Online: Opens the Report Browser to display your available
reports in a directory tree structure. Double-click a report icon to run and open it in
your Excel session.
Use the Report Browsers Up icon to move up the directory structure.
Use the View As menu to view the folder contents as Large Icons, Small Icons, List, or
Details.
Preferences: Select your locale and proxy settings, if required.
Logging in Through Excel
After you have installed the Analyzer for Excel, you can log in to the Oracle BI Publisher
Enterprise server any time from Excel. You do not have to log in to Oracle BI Publisher
first.
After you have Excel open, simply select Log In from the Oracle BI Publisher menu. The
Oracle BI Publisher Enterprise log in screen will prompt you to enter your credentials and to
select (or enter) the Report Server URL.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 22

Creating a New Folder

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a New Folder


Note: You must be assigned the Oracle BI Publisher Developer role or Admin Role to create
folders.
You can create new folders on your home level or navigate to the folder in which you want
the new folder to reside.
From the Folder and Report Tasks menu, select Create a new folder.
Enter the Folder Name in the text box that launches, and select Create.
To Rename a folder, select Folder and choose Rename this folder. Enter a new name
for the folder, and select Rename.
To Copy a folder, select Folder and choose Copy this folder. It will copy the folder
to the clipboard. Then click in an empty space on the home page. Choose Paste from
the clipboard. If the folder name already exists at that level, it will not allow a copy.
To Delete a folder, select Folder and choose Delete this folder. A dialog box will
open to confirm the deletion process, which will include all subfolders and reports
beneath the folder you are deleting. Select OK to delete, or select Cancel to abort the
deletion process.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 23

Creating a New Report:


Process Overview

Create the report entry in the desired folder on the


Reports page.
Define the data model in the Report Editor.
Your report may be from a SQL Query, an HTTP feed,
a Web service, or BI Publishers data template. The
Report Editor allows you to define your query, your
parameters to pass to the query, and the list of
values to select parameter values.

Generate sample data from your query.


Design the layout template.
Upload your templates to the Report Editor.
Add translations for your report headers (optional).

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 24

Creating a New Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a New Report


Navigate to the folder of your choice, and then click Create a new report.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 25

Creating a New Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a New Report (continued)


To continue with the process, we need to define the details of this report. Click Edit.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 26

Editing the Report Properties

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Editing the Report Properties


Enter the Report Properties:
Description: The description will appear beneath the report name within the report
folder.
Default Data Source: Select the data source from the list of values. You may define
multiple data sources for your report when you define the Data Model. The Default
Data Source you select here will be presented as the default for each new data set you
define. Select Refresh Data Source List to see any new data sources that may have
been added since your session was initiated.
Parameters per line: Enter the number of parameters that you want to display before
creating a second parameter line for the report. The parameter line is displayed in the
online report View page and the Schedule page.
Run report online: Select this option to enable this report in the online viewer. If it is
not selected, users will be able to Schedule the report only.
Show controls: Select this option so that all users can see the control region of the
report. The control region consists of the Template list, Output list, and Parameter lists.
Open Links in New Window?: Select this option to open any links contained in the
report in a new browser window.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 27

Defining the Data Model

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Defining the Data Model


This will display the Main Data Set list. This list will be empty until you define a data set.
To define a data set, select New and enter a Name and Type for the data set. Types include:
SQL Query
HTTP (XML Feed)
Web Service
Data Template
Use Oracle BI Publishers data template to create more complex queries.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

If You Select SQL Query


Select the Data Source Reference from the list. This will default to the Default Data
Source selected on the Report Properties page.
Select the Cache Result? option to cache the results of the query for your session.
- By caching the results of the query, multiple templates can be applied to these
results without requerying the data. This will enhance online performance.
However, if the data is updated during the session, the user cannot view the new
data via the View report page until the cache is cleared.
Note: You can control the cache expiration time and the cache size in the server
configuration file.
Enter the SQL query or select Query Builder.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 28

Defining the Data Model (continued)


Note: If your data set is a Web Service or HTTP (XML Feed), you must define parameters
before you define the data set.
If You Select HTTP (XML Feed)
Enter the URL for the XML feed.
Select the Method: Get or Post.
Enter the Username, Password, and Realm for the URL.
To add a parameter, select the Add link. Enter the Name and select the Value. The
Value list is populated by the parameter Identifiers defined in the Parameters section.
Note: The parameters must already be set up in the Parameters section of the report
definition
If You Select Web Service
Enter the WSDL URL and the Web Service Method.
Note: To use a Web Service as a data source, the Web Service must return XML as a
string.
To specify a parameter, select the Add link. Select the parameter from the list.
Note: The parameters must already be set up in the Parameters section of the report
definition.
- Enter the WSDL URL in a browser window to see the WSDL definition. For
example: http://xmlme.com/WSCustNews.asmx?WSDL
- The available methods will be listed in the WSDL definition. For example:
GetCustomNews
- Once you have the method, you can see the parameters required. For example:
TOPIC
- Add the parameters for the WSDL to the report definition.
If You Select Data Template
Copy and paste your data template into the Data Template text box.
Use Oracle BI Publisher's data template to create more complex queries
After you have defined your data sets, select Data Model. The data sets that you have
defined will now populate the list for Main Data Set. Select the data set that will be used to
generate the report.
Note: The data template must begin with the <dataTemplate> element. Do not include
the XML declaration.

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 29

Using the Query Builder


The Query Builder is divided into three sections:
The Object Selection pane contains a list of
objects from which you can build queries. Only
objects in the current/selected schema are
displayed.
The Design pane displays selected objects from
the Object Selection pane.
The Output pane allows you to create conditions,
view the generated SQL, or view query results.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 30

Query Builder: Process Overview

Design

Object

Output

y
m

Selection

Copyright 2007, Oracle. All rights reserved.

Query Builder: Process Overview


To build a query, perform the following steps:
1. Select objects from the Object Selection pane.
2. Add objects to the Design pane and select columns.
3. Establish relationships between objects (optional).
4. Create query conditions (optional).
5. Execute the query and view the results.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 31

Creating a List of Values

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 32

Creating a Parameter

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 33

Creating and Uploading Your Layout

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 34

Creating a New Layout Template

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 35

Uploading the Template

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 36

Summary
In this lesson, you should have learned how to:
Access Oracle BI Publisher Enterprise
View and schedule reports
Create a new report

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 37

Practice 11: Overview


This practice covers the following topics:
Manipulating an existing BI Publisher report
Creating a BI Publisher report
Report properties
Data model (using an XML data file)
Layout

Downloading, changing, and uploading a template


in BI Publisher Enterprise

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 11 - 38

Translating Reports

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this module, you should be able to do
the following:
Describe the options for translating reports by
using BI Publisher
Create the translation files by using BI Publisher
Desktop
Create the translation files by using BI Publisher
Enterprise

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 2

Translation Options

There are two options for adding translated


templates to your report definition:
Create a separate RTF template that is translated.
Generate an XLIFF file from the original template. At
run time, the original template is applied for the layout
and the XLIFF file is applied for the translation.

Use the first option if the translated template


requires a different layout from the original template.
If you require only translation of the text strings of
the template layout, use the XLIFF option.
Important: Regardless of which option you choose, you
must name your translated templates according to the
naming standard for Oracle BI Publisher to recognize it at
run time.
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 3

Localized Template Option

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 4

XLIFF File Option

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 5

Structure of the XLIFF File

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Structure of the XLIFF File


The XLIFF file generated by Oracle BI Publisher has the following structure:
<xliff>
<file>
<header>
<body>
<trans-unit>

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

<source>
<target>
<note>

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 6

Updating the XLIFF File

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Updating the XLIFF File


<source> and <target> Elements
Each <source> element contains a translatable string from the template in the source
language of the template.
Example:
<source>Total</source>

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

When you initially export the XLIFF file for translation, the source and target elements are
all identical. To create the translation for this template, enter the appropriate translation for
each source element string in its corresponding <target> element.
Therefore, if you were translating the sample template into German, you would enter the
following for the Total string:
<source>Total</source>
<target>Gesamtbetrag</target>

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 7

Naming Standards
Your translated XLIFF and RTF files must be named
according to the following standard:
TemplateName_<language code>_<TERRITORY
CODE>.xlf or .rtf
or
TemplateName_<language code>.xlf or .rtf
where TemplateName is the original template name;
language code is the two-letter ISO language code (in
lowercase); and TERRITORY CODE is the two-letter ISO
country code (must be in uppercase).
For example, if your original template is named
EmployeeTemplate and you are uploading a translation for
Japanese-Japan, name the file as follows:
EmployeeTemplate_ja_JP.xlf
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 8

Locale Selection Logic


Oracle BI Publisher applies a translation based on the
users selected Report Locale. Oracle BI Publisher will
first try to match an RTF template named for the locale,
and then an XLIFF file named for the locale. If an exact
match on language-territory is not found, Oracle BI
Publisher will try to match on language only.
For example, if you have a report for which the base
template is called EmployeeTemplate.rtf and the
locale selected is French (France), Oracle BI Publisher
will select the translation to apply according to the
following hierarchy:
EmployeeTemplate_fr_FR.rtf
EmployeeTemplate_fr_FR.xlf
EmployeeTemplate_fr.rtf
EmployeeTemplate_fr.xlf
EmployeeTemplate.rtf
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Locale Selection Logic


For Chinese (China), Chinese (Taiwan), and Portuguese (Brazil), you must use the language
code and the territory code in the translated file names as follows:

ReportName_zh_CN.xfl

ReportName_zh_TW.xfl

ReportName_pt_BR.xfl

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 9

Translating Templates
in BI Publisher Desktop
To generate an XLIFF file from an RTF template:
1. Open your template in Microsoft Word with Oracle
BI Publisher Desktop for Word installed.
2. In the Oracle BI Publisher Desktop menu, select
Tools > Translations > Extract Text.
3. Oracle BI Publisher extracts the translatable
strings from the template and exports them to an
XLIFF (.xlf) file.
4. Save the file to the desired location.
This XLIFF file can then be sent to a translation
provider. Or, by using a text editor, you can enter the
translation for each string.
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Translating Templates in BI Publisher Desktop


BI Publisher does not do the translation. It provides a standardized file that can then be
translated by third-party software or a translation service.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 10

Report File Translations


To add a report file translation:
1. In the report editor, select Generate XLIFF.
2. Save the .xlf file to a local directory.
3. Send the file to a localization provider, or add the
translated text.
4. Name the translated report file according to the
following standard for all languages except
Chinese and Portuguese (Brazil):
ReportName_<language_code>.xlf
where ReportName is the report file name and
language_code is the two-letter ISO language
code (in lowercase).
Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Report File Translations


You can add translated report description files so that your users can view the report
description and any parameter labels in the language they selected for their UI preference.
Upload translated report description files to the same location as the translated template
files. Note that the translated report description files follow a naming standard that is slightly
different than the translated template file standard.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 11

Translating Your Report Description


in BI Enterprise

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Translating Your Report Description in BI Enterprise


Edit the report, and then select Generate XLIFF (XML Localization Interchange File
Format). This is an XML-based standard for generating translation files for your report
Description and parameter labels.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 12

Saving the XLIFF File

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 13

Uploading the XLIFF

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Uploading the XLIFF


You can upload the XLIFF files and associate them with a report in BI Publisher Enterprise.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 14

Summary
In this module, you should have learned how to:
Describe the options for translating reports by
using BI Publisher
Create the translation files by using BI Publisher
Desktop
Create the translation files by using BI Publisher
Enterprise

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 12 - 15

y
m

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

Building a Data Template

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives

After completing this module, you should be able to do the


following:
Understand the XML Publisher data template
Create a data template
Associate that data template with a report

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 2

Data Templates

The Oracle XML Publisher data engine enables you to


rapidly generate any kind of XML data structure against
any database in a scalable, efficient manner.
The data template is the method by which you
communicate your request for data to the data engine.
Definition: A data template is an XML document whose
elements collectively define how the data engine will
process the template to generate the XML.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 3

Data Extraction Engine

XML output

Data Extraction Engine

Data engine
processor

Data
template

Report
generating
engine
Default RTF

Data engine
utility

y
m

XML Schema

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 4

What Functionality Is Supported?

The data engine supports the following functionality:


Schema generation
Default RTF template generation
Flexfields
Single and multiple data queries
Query links
Parameters
Aggregate functions (SUM, AVG, MIN, MAX, COUNT)
Event triggers
Multiple data groups

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

What Functionality Is Supported?


This lesson covers only the functionality that is supported in a stand-alone instance.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

y
m

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 5

Supported Functionality

The XML output generated by the data engine supports the


following:
Unicode for XML output
Unicode is a global character set that allows
multilingual text to be displayed in a single application.
This enables you to develop a single multilingual
application and deploy it worldwide.
Canonical format
The data engine generates date elements using the
canonical ISO date format: YYYY-MMDDTHH24:MI:SS.FF3TZH:TZM for a mapped date
element, and ######.## for number elements in the
data template XML output.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 6

Report Migration
PL/SQL
developer
code

Oracle Reports
files
RDF-2-Data
Template
Migration Tool

XML data template


Data query
Parameters
Groups/summary

y
m

PL/SQL reference

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 7

Data Template Definition

The data template is an XML document that consists


of three basic sections.

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Data Template Definition


As shown in the sample figure, the data template consists of a <parameters> section in which
parameters are declared in child <parameter> elements; a <dataQuery> section in which
the SQL queries are defined in child <sqlStatement> elements; and a <dataStructure>
section in which the output XML structure is defined.
See the next page for a table of elements.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 8

Data Template Definition (continued)


Element
dataTemplate

parameters
parameter

lexicals
lexical
dataQuery
sqlstatement

link

Description
(Required) The Attributes are:
name (Required)
description
version (Required)
defaultPackage
dataSourceRef
Consists of one or more <parameter> elements
Attributes are:
name (Required)
dataType
Consists of one or more lexical elements to support flexfields
4 types KFF segments, KFF, KFF where, and KFF order by
(Required) Consists of one or more <sqlstatement> elements
(Required) Attributes are:
name (Required)
dataSourceRef
Attributes are:
parentQuery
parentColumn
childQuery
childColumn
condition
The trigger and the event that it fires on. Attributes are:
name (Required)
source (Required)
Required for multiple queries group
Consists of one or more <element> elements and sub <group>
elements. Attributes are:
name (Required)
source (Required)
groupFileter
The tag name to assign the element in the XML data output.
Attributes are:
name
value (Required)
function

e
d
a

y
m

dataTrigger

dataStructure

element

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 9

Data Template Structure


Name
Parameters

dataType
defaultType

Data
Template

type
Lexicals

name
comment

-sqlStatement
Data Query

link
name

Data Triggers

name

source
source
group

Data Structure

group

Copyright 2007, Oracle. All rights reserved.

e
l
c

y
m

groupFilter

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 10

Data Template Declaration

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 11

Defining Parameters

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Defining Parameters
A parameter is a variable whose value can be set at run time. Parameters are especially useful for
modifying SELECT statements and setting PL/SQL variables at run time. The Parameters section
of the data template is optional.
How to Define Parameters
The <parameter> element is placed between the open and close <parameters> tags. The
<parameter> element has a set of related attributes. These are expressed within the
<parameter> tag. For example, the name, dataType, and defaultValue attributes are
expressed as follows:
<parameters>
<parameter name="department" dataType="number
defaultValue="10"/>
</parameters>

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 12

Defining Parameters (continued)


How to Pass Parameters
To pass parameters (for example, to restrict the query), use bind variables in your query.
Example
Query:
SELECT * FROM EMP WHERE deptno=:department
At run time, the value of department is passed to the query:
SELECT * FROM EMP WHERE deptno=10

y
m

e
d
a

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 13

Defining Queries

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Defining Queries
The <sqlStatement> element is placed between the open and close dataQuery tags. The
<sqlStatement> element has a related attribute, name. It is expressed within the
<sqlStatement> tag. The query is entered in the CDATA section.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Example
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[SELECT DEPTNO,DNAME,LOC from dept]]>
</sqlStatement>
</dataQuery>

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 14

Data Query

How to define queries:


Use <sqlStatement name=""> to define a query.

Performing operations in SQL is faster than performing


them in a data template or PL/SQL. The following are
the most common cases in which using SQL improves
performance:
Use a WHERE clause instead of a group filter to exclude
records.
Perform calculations directly in your query rather than in
the template.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Data Query
If your column names are not unique, you must use aliases in your SELECT statements to ensure
the uniqueness of your column names. If you do not use an alias, the default column name is
used. This becomes important when you specify the XML output in the data structure section.
To specify an output XML element from your query, you declare a value attribute for the element
tag that corresponds to the source column.
Tip: Performing operations in SQL is faster than performing them in the data template or
PL/SQL. It is recommended that you use SQL for the following operations:
Use a WHERE clause instead of a group filter to exclude records.
Perform calculations directly in your query rather than in the template.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 15

Data Query (continued)


Lexical References
You can use lexical references to replace the clauses appearing after SELECT, FROM,
WHERE, GROUP BY, ORDER BY, or HAVING. Use a lexical reference when you want the
parameter to replace multiple values at run time.
Create a lexical reference by using the following syntax:
&parametername
Define the lexical parameters as follows:
Before creating your query, define a parameter in the PL/SQL default package for
each lexical reference in the query. The data engine uses these values to replace the
lexical parameters.
Create your query containing lexical references.
Example
Package employee
AS
where_clause varchar2(1000);
.....
Package body employee
AS
.....

y
m

e
d
a

where_clause := 'where deptno=10';


.....
Data template definition:
<dataQuery>
<sqlstatement name="Q1">
<![CDATA[SELECT ENAME, SAL FROM EMP
&where_clause]]>
</sqlstatement>
</dataQuery>

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 16

Example: Data Query


<parameters>
<parameter name="p_DeptNo" dataType="character" />
</parameters>
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[
SELECT d.DEPTNO,d.DNAME,d.LOC,
EMPNO,ENAME,JOB,MGR,HIREDATE,SAL
from dept d, emp e
where d.deptno=e.deptno
AND d.deptno = nvl(:p_DeptNo,d.deptno)

]]>

y
m

</sqlStatement>
</dataQuery>
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 17

Defining a Data Link Between Queries

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Defining a Data Link Between Queries


If you have multiple queries, you must link them to create the appropriate data output. In the data
template, there are two methods for linking queries: using bind variables or using the <link>
element to define the link between queries.
Tip: To maximize performance when building data queries in the data template, use a bind
variable rather than the link tag. XML Publisher show this approach to be more efficient.
The following example shows a query link using a bind variable:
<dataQuery>
<sqlstatement name="Q1">
<![CDATA[SELECT EMPNO, ENAME, JOB from EMP WHERE DEPTNO =
:DEPTNO]]>
</sqlstatement>
</dataQuery>
The <link> element has a set of attributes. Use these attributes to specify the required link
information. You can specify any number of links, as in the following example:
<link name="DEPTEMP_LINK" parentQuery="Q1"
parentColumn="DEPTNO" childQuery="Q_2
childColumn="DEPARTMENTNO"/>

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 18

Linking Queries

Two ways of linking are supported


Bind variables in your query
Link elements <link name="" ../>
Bind variables are usually more efficient than link
elements.

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 19

Example: Link Query


Using a bind variable
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[
SELECT DEPTNO,DNAME,LOC from dept where
&pwhereclause
order by deptno

]]>

</sqlStatement>
<sqlStatement name="Q2">
<![CDATA[
SELECT

EMPNO,ENAME,JOB,MGR,HIREDATE,SAL
from EMP
WHERE DEPTNO = :DEPTNO

]]>

y
m

</sqlStatement>

e
d
a

</dataQuery>
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 20

Example: Link Query


Using the <link> tag
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[
SELECT DEPTNO,DNAME,LOC from dept where &pwhereclause
order by deptno

]]>

</sqlStatement>
<sqlStatement name="Q2">
<![CDATA[
SELECT

EMPNO,ENAME,JOB,MGR,HIREDATE,SAL
from EMP ]]>

</sqlStatement>

y
m

<link name="DEPTEMP_LINK" parentQuery="Q1" parentColumn="DEPTNO"


childQuery="Q2" childColumn=DEPTNOcondition="="/>

e
d
a

</dataQuery>
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 21

Data Triggers

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Data Triggers
Data triggers execute PL/SQL functions at specific times during the execution and generation of
XML output. Using the conditional processing capabilities of PL/SQL for these triggers, you can
do things such as perform initialization tasks and access the database.
Data triggers are optional, and you can have as many <dataTrigger> elements as necessary.
The <dataTrigger> element has a set of related attributes. These are expressed within the
<dataTrigger> tag. For example, the name and source attributes are expressed as follows:
<dataTrigger name="beforeReport"
source="employee.beforeReport()"/>
<dataTrigger name="beforeReport"
source="employee.beforeReport(:Parameter)"/>

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 22

Using Data Triggers

Data triggers can be used to:


Perform initialization tasks
Build dynamic queries

Data trigger types


beforeReport trigger: Fires before the data query is
executed
afterReport trigger: Fires after you exit and after XML
output has been generated

Example:
<dataTrigger name="beforeReport"
source="employee.beforeReport()"/>
<dataTrigger name="beforeReport"
source="employee.beforeReport(:Parameter)"/>

Copyright 2007, Oracle. All rights reserved.

y
m

e
d
a

c
A

Using Data Triggers


The location of the trigger indicates at what point the trigger fires:
Place a beforeReport trigger anywhere in your data template before the
<dataStructure> section.. A beforeReport trigger fires before the dataQuery is
executed.
Place an afterReport trigger after the <dataStructure> section. An
afterReport trigger fires after you exit and after XML output has been generated.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 23

Data Structure Section

In the data structure section, you define what the XML


output will be and how it will be structured. You can do the
following:
Define a group hierarchy.
Create break groups.
Apply group filters.
Create summary columns.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Data Structure Section


In the data structure section you define what the XML output will be and how it will be
structured. The complete group hierarchy is available for output. You can specify all the columns
within each group and break the order of those columns; you can use summaries and placeholders
to further customize within the groups. The data structure section is required for multiple queries
and optional for single queries. If omitted for a single query, the data engine will generate flat
XML.
Chapter 9 of the BI Publisher Users Guide has provides information on how to build this section.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 24

Data Structure
Break groups
Order By in SQL query should be set.

Group filters
WHERE clause should be used instead of a group filter.

Summary column
Sum, Average, Count, Maximum, and Minimum

Example:
<group name="G_DEPT" source="Q1"
groupFilter="empdata.G_DEPTFilter(:DEPT_NUMBER)">
<element name="DEPT_NUMBER" value="DEPTNO" />
<element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()"/>
<group name="G_EMP" source="Q2">
<element name="EMPLOYEE_NUMBER" value="EMPNO" />
<element name="NAME" value="ENAME"/>
<element name="JOB" value="JOB" />
<element name="SALARY" value="SAL"/>
</group>
</group>
Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

y
m

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 25

Easy and Quick to Build


<?xml version="1.0" encoding="WINDOWS-1252" ?>
<dataTemplate name=Employees" description="Templat" version="1.0">
<parameters>
<parameter name="Parameter1" dataType="character"
defaultValue="Null"/>
<parameter name="Parameter2" dataType="date"
formatMask="DD/MM/YYYY"/>
</parameters>
<dataQuery>
<sqlStatment name="Q1">
<![CDATA[SELECT DEPTNO,DNAME,LOC from dept]]>
</sqlStatment>
<sqlStatment name="Q2">
<![CDATA[SELECT EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM
from EMP
WHERE DEPTNO = :DEPTNO]]>
</sqlStatment>
</dataQuery>
<dataTrigger name="beforeReport"
source="employee.beforeReport(:parameter1)"/>
<dataStructure>
<group name="G_DEPT" source="Q1
groupFilter="empdata.G_DEPTF(:parameter1)">
<element name="DEPT_NUMBER" value="DEPTNO" />
<element name="DEPT_NAME"
value="DNAME"/>
<element name="DEPTSAL"
value="G_EMP.SALARY"
type="SUM()"/>
<element name="LOCATION" value="LOC" />
<group name="G_EMP" source="Q2">
<element name="EMPLOYEE_NUMBER" value="EMPNO" />
<element name="NAME" value="ENAME"/>
<element name="JOB" value="JOB" />
<element name="MANAGER" value="MGR"/>
<element name= "HIREDATE" value="HIREDATE"/>
<element name="SALARY" value="SAL"/>
</group>
</group>
</dataStructure>
</dataTemplate>

<?xml version="1.0" encoding="UTF-8" ?>


- <Employees>
- <LIST_G_DEPT>
- <G_DEPT>
<DEPT_NUMBER>10</DEPT_NUMBER>
<DEPT_NAME>ACCOUNTING</DEPT_NAME>
<LOCATION>NEW YORK</LOCATION>
- <LIST_G_EMP>
- <G_EMP>
<EMPLOYEE_NUMBER>7782</EMPLOYEE_NUMBER>
<NAME>CLARK</NAME>
<JOB>MANAGER</JOB>
<MANAGER>7839</MANAGER>
<HIREDATE>1981-0009T00:00:00PDT</HIREDATE>
<SALARY>2450</SALARY>
</G_EMP>
- <G_EMP>
<EMPLOYEE_NUMBER>7839</EMPLOYEE_NUMBER>
<NAME>KING</NAME>
<JOB>PRESIDENT</JOB>
<MANAGER />
<HIREDATE>1981-0017T00:00:00PST</HIREDATE>
<SALARY>5000</SALARY>
</G_EMP>
-<G_EMP>

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

y
m

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 26

Summary

In this module, you should have learned how to:


Understand the XML Publisher data template
Create a data template
Associate that data template with a report

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 27

Practice 13: Overview

This practice covers the following topics:


Creating a simple data template
Creating a data template with parameters
Creating a data template with multiple queries

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 13 - 28

Integration with
Oracle Business Intelligence
Enterprise Edition

y
m

Copyright 2007, Oracle. All rights reserved.

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A

e
d
a

Objectives
After completing this lesson, you should be able to do
the following:
Publish a BI Publisher report created from an
Answers request
Publish a BI Publisher report created from the
BI Server repository

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Objectives
In this lesson, you learn about the various ways to create reports from Oracle Business
Intelligence Enterprise Edition and publish in BI Publisher.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 2

Oracle Business Intelligence


Enterprise Edition
Interactive
Dashboards

Reporting &
Publishing

Ad-hoc
Analysis

Proactive
Detection
and Alerts

MS Office
Plug-in

Disconnected
Analytics

Simplified Business Model and Abstraction Layer

Oracle Multidimensional Calculation and Integration Engine


BI Server Common Metadata, Security, Filtering, Personalization, Management, Scheduling
Intelligent Request Generation and Optimized Data Access Services

OLTP &
ODS
Systems

Data
Warehouse
Data Mart

SAP, Oracle
PeopleSoft, Siebel,
Custom Apps

Files
Excel
XML

Copyright 2007, Oracle. All rights reserved.

y
m

Business
Process

e
d
a

c
A

Oracle Business Intelligence Enterprise Edition


The Oracle Business Intelligence Enterprise Edition (Oracle BI EE) platform is a
comprehensive suite of enterprise BI products, delivering the full range of BI capabilities
including interactive dashboards, full ad hoc analysis, proactive intelligence and alerts,
enterprise reporting, real-time predictive intelligence, mobile analytics, and more. It consists
of several products that can be used together or independently.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 3

BI Presentation Services
and Web Clients
Answers, Dashboards, and so on:

More Products:

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

BI Presentation Services and Web Clients


BI Presentation Services is an extension to an existing Web Server. It receives requests from
a BI client, retrieves the requested information from the BI Server, and then renders the
information inside the requesting client. BI Presentation Server uses a Web catalog to store
contents such as requests and interactive dashboards.
BI Answers: This is an ad hoc query analysis tool that works against a logical view of
information from multiple data sources in a pure Web environment.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

BI Interactive Dashboard: Rich and interactive pure Web dashboards display personalized
information to guide users to precise and effective decisions.
More Products: More Products provides access to other products such as BI Publisher,
Delivers, Marketing, and Disconnected Analytics. Delivers is an alerting engine to capture
and distribute notifications via multiple channels in response to predefined business events.
Marketing is an analytics application. Disconnected Analysis is a packaged solution to use
Answers and Dashboards for mobile professionals on computers disconnected from
networks.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 4

BI Server

Is the core server behind Oracle Business


Intelligence
Provides efficient processing to intelligently
access physical data sources and structure
information
Uses metadata for processing
Generates dynamic SQL to query data in the
physical data source
Structures results to satisfy requests
Provides results to the BI Presentation Server

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

BI Server
BI Server is the core server behind Oracle Business Intelligence. It is an optimized query
engine that receives requests, accesses multiple physical data sources, generates SQL to
query data in the data sources, and then structures the results for the query. Transparent to
both end users and query tools, the BI Server functions as the integrating component by
acting as a layer of abstraction and unification over the underlying databases.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 5

BI Administration Tool

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

BI Administration Tool
BI Server stores metadata in repositories. Administration Tool has a graphical interface
using which you can set up three layers of the repository.

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

Physical layer: This contains information about the physical data source to which the BI
Server submits requests.
Business Model and Mapping layer: This defines the business or logical models of the
data, and specifies the mapping between the Business Model and the Physical layer
schemas.
Presentation layer: Objects in this layer map to the Business Model and Mapping layer.
Multiple presentation catalogs can reference the same business model. Presentation layer
objects appear as subject areas, folders, and columns in BI Answers. Presentation layer
objects define what the users see to query the data from the data sources.

e
l
c

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 6

Creating a BI Publisher Report


from an Answers Request

Create an Answers request in BI EE.


Access the request in BI Publisher Server.
Associate a template with the request.
Publish the report in BI Publisher or in BI
Dashboard.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a BI Publisher Report from an Answers Request


Create an Answers request. You can display the results in Answers but it will not have any
layout associated with it. Save the report. In BI Publisher, access the same report and
associate a template with the request and publish it in any format supported by BI Publisher.
You can also access the same report from BI Publisher and display it in BI Dashboard.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 7

Creating an Answers Request

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating an Answers Request


Log in to Oracle BI Enterprise Edition and click the Answers link on the top. Select a
subject area from the right pane. After you select a subject area, the selection pane on the
left is automatically displayed with all the logical tables in that subject area. Expand the
tables and construct your request by clicking the columns from the tables in the subject area.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 8

Displaying Request Results

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Displaying Request Results


After you have constructed a request by selecting columns, click the Results tab on the right
pane to view the results. Data is automatically sorted by the first column and then by the
next column. Repeating values are suppressed by default. Only the first 25 rows of data are
returned initially. More data can be displayed by the use of the buttons at the bottom. There
are multiple ways to view the results, such as tables, charts, and so on. Save your request.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 9

Publishing the Request in Dashboard

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Publishing the Request in Dashboard


Based on your permissions, you can view preconfigured dashboards or create your own. To
create your own dashboard, perform the following steps:
1. Click the Dashboards link on the top.
2. Select Page Options > Edit Dashboard. The Dashboard Editor is displayed.
3. From the left selection pane, drag the report you just created to the Section object on
the right pane.
4. Save the dashboard. The dashboard is displayed with the report.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 10

Connection to BI EE from BI Publisher

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Connection to BI EE from BI Publisher


BI Publisher Server is connected to BI Presentation Services through the Integration page.
The server URL and port number, along with the other credentials, are entered on this page
to allow BI Publisher to access the data through BI Enterprise Edition.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 11

Creating a Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a Report
In BI EE, click the More Products link. From the drop-down list, select BI Publisher. This
brings you to the BI Publisher page. Create a report with a name in BI Publisher.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 12

Specifying the Data Set for the Report

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Specifying the Data Set for the Report


Using the Edit option for the report, you can provide all the details for the report. To specify
the data set for the report:
1. Select the Edit option for the report you just created.
2. Select Data Model and click New. The Data Set screen appears on the right.
3. Enter a name for the data set.
4. From the Type drop-down list, select Oracle BI Answers
5. In the Details section, click the flashlight icon and select the request you created in
Answers from BI Catalog.
6. Save the details.
7. You can now view the XML output of the request in BI Publisher by selecting the
View option for the report.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 13

Creating a New Layout

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a New Layout


Create a new layout. Enter a name for the layout and upload the template you have created
in MS Word for the report. Save the report. You can now view the report in BI Publisher in
various formats such as HTML, PDF, and so on with the View option.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 14

Viewing the Final Report


from Answers Request

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Viewing the Final Report from Answers Request


Click View, select the type in which you want to view the report, and then click View again.
The report with its associated template will be displayed in BI Publisher.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 15

Viewing the Report in BI EE Dashboard


1 Dashboard > Page Option > Edit Dashboard

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Viewing the Report in BI EE Dashboard


To view the report that you just created in BI Publisher in BI EE Dashboard:
1. Click the Dashboard link and click Page Option in the upper-right corner. Select Edit
Dashboard from the drop-down list.
2. From Dashboard Objects, drag the BI Publisher Report object to Section 1 in the right
pane.
3. Click the Properties link for this object. The BI Publisher Report Properties dialog box
is displayed.
4. Browse and select your BI Publisher report and click OK. The report with the
associated template is displayed.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 16

Creating a Report from BI Server

Create the query from BI Server metadata.


Associate a template with the request.
Publish the report in BI Publisher or BI Dashboard.

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating a Report from BI Server


In this case, instead of picking a request from Answers, the query is built directly against the
metadata in BI Server. Because the query is not against the physical data but against the
logical data model, there is no need to define any joins between the tables. After the query is
built, associate a template and then view the report in either BI Publisher or BI EE
Dashboard.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 17

Creating the Query

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Creating the Query


Log in to BI Publisher and create a new report. Set the type of the request to SQL Query.
Select the data source as Oracle BI EE. The data will actually be sourced through the
metadata in BI Server. Click the Query Builder button.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 18

Using the Query Builder

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Using the Query Builder


A new window is displayed with subject areas in the drop-down list on the left pane. Select
the subject area you want for your report. After you select the subject area, all the logical
tables in that subject area will be displayed. Select the tables you want and drag them to the
upper-right pane. As the tables are dragged to the right pane, all the columns in the table will
be displayed. Select the columns you want from the tables. Notice that, as you select the
columns from the tables, a row is created for each of the columns at the bottom pane. There
is no need to create any joins because the columns are picked from logical tables in the
repository in BI Server.
In the table at the bottom, you can specify the grouping, conditions, and sorting order for
each of the selected columns. After you finish, save the query.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 19

Using the Query Builder

y
m

Copyright 2007, Oracle. All rights reserved.

e
d
a

c
A

Using the Query Builder (continued)


The SQL query is displayed in the SQL Query field. Associate a template with the report.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 20

Viewing the Final Report from BI Server

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 21

Summary
In this lesson, you should have learned how to:
Publish a BI Publisher report created from an
Answers request
Publish a BI Publisher report created from the BI
Server repository

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 22

Viewlet Demonstrations
View two demonstrations:
Creating a BI Publisher Report from a BI Answers
Request
Creating a BI Publisher Report from BI Server
Metadata
Note: At the start of each viewlet, click OK when the
Macromedia Flash Player window appears.
Hands-on practice: Oracle By Example (OBE) tutorial,
which is accessible at no cost on OTN:
http://www.oracle.com/technology/obe/obe_bi/bipub/index.html

y
m

Copyright 2007, Oracle. All rights reserved.

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

e
d
a

c
A

a
r
O

11i Oracle XML Publisher Fundamentals (NAMER) 14 - 23

y
m

e
d
a

a
r
O

e
l
c

e
l
c
a
r
O ly
& On
l
a e
n
r
s
e
t
U
n
I

c
A