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

Agenda

What is XML Publisher?


Why XML Publisher?
Report Customization Vs. XML Publisher
Designing using XML Publisher
Sample XML Report Development

What is XML Publisher?

XML Publisher

Oracle XML Publisher is a tool which enables


users to produce

flexible
high quality
template-based publishing

reports from Oracle E-Business Suite.

Concept
The main feature of XML Publisher is that it separates

the Data Source from the presentation/Layout.


Data Logic
Layout
XML Publisher

Translation

Report
output

XML Publisher Overview


XML Data Source

XML Publisher

XML Processing Engine

Oracle
Applications

Other XML
Data Sources

XML

Example Outputs

Formats

Why XML Publisher?

Using XML Publisher


XML Publisher enables user to design the report

layout using Microsoft word or Adobe Acrobat.


In Brief,
Meet

Business Requirements
Removes Complexity
Reduces Maintenance Cost

Some Candidate documents for XML Publisher

Government Forms
Complex Layouts
Government Forms

High fidelity
Fixed formats

Example:

Customs Form
SF52
W-2
1099

Government Forms
Canada Customs Invoice

Partner Reports
Requirements
High

fidelity
(company logos)
Exact Layout
Tables

Example:
Purchase

Order
Commercial Invoice
Bill of Lading

Partner Reports

Report customization
Vs
XML Publisher

Familiar Design Tools


Report Formats can be designed using Desktop

Applications

Microsoft Word
Adobe Acrobat Reader

F
D
P

F
T
R

Standard Reports would need complex customizations

to the RDF or third party solution to precisely position


the Report details.

Benefits of XML Publisher


Meet Business Requirements
Flexibility
Lesser complexity
Reduced Maintenance

Designing using XML Publisher

Process Overview
Set up the XML Publisher responsibility
Set the E-Business Suite report to generate XML

output.
Register the E-Business Suite report as a Data
Definition with XML Publisher.
Design the template and Register the template in the
Template Manager.
Submit the XML report Concurrent request to
generate PDF,EXCE or RTF report format.

XML Publisher Responsibility

XML Publisher Data Source


Set the output type for the concurrent program to XML

XML Data Definition


Navigation:
XML Publisher Administrator-> Data Definition-> Create Data Definition

XML Template
Navigation:
XML Publisher Administrator-> Template -> Create Template

Available Template Styles


PDF Templates
RTF Templates
e-Text Templates :- Usually used for generating EFT

and EDI format flat files

Available Template Styles

Sample XML Report Development

Report Development
Develop or use an existing report for generating XML

Concurrent Program Setup

Get XML Data

Sample XML
<?xml version="1.0"?>
<!-- Generated by Oracle Reports version
6.0.8.11.3 -->
<T00404464>
<LIST_G_SALES_ORGN>
<G_SALES_ORGN>
<SALES_ORGN>TET</SALES_ORGN>
<LIST_G_ORDER_DETAILS>
<G_ORDER_DETAILS>
<SORT_ORDER_VALUE>200009</SORT_
ORDER_VALUE>
<ORGN>TET-200009</ORGN>
<BOL_NO>12004</BOL_NO>
<WHSE>T1</WHSE>
<SORT_DT>28-FEB-08</SORT_DT>
<RQST_SHIPDT>28-FEB2008</RQST_SHIPDT>
<CUSTOMER_NAME>CONTECH
ATLANTA</CUSTOMER_NAME>
<CT_ST_ZP>CONYERS,
GA</CT_ST_ZP>

<ITEM_NO>BX150060</ITEM_NO>
<QTY>25</QTY>
<SHIPPING_UOM>RL</SHIPPING_UOM>
<SHIP_METHOD_CODE></SHIP_METHOD_CODE>
<STATUS>Awaiting Allocation</STATUS>
<LINE_ID>1982</LINE_ID>
<SHIPPER_CODE></SHIPPER_CODE>
<PO>TEST ORDER#5</PO>
</G_ORDER_DETAILS>
</LIST_G_ORDER_DETAILS>
</G_SALES_ORGN>
</LIST_G_SALES_ORGN>
</T00404464>

Understanding XML Output


<?xml version="1.0"?>
Opening
<ITEM_NO>BX150060</ITEM_NO>
Closing
<!-- Generated by Oracle Reports version
<QTY>25</QTY>
Tag
Tag
6.0.8.11.3 -->
<SHIPPING_UOM>RL</SHIPPING_UOM>
Root Tag
<T00404464>
<LIST_G_SALES_ORGN>
<SHIP_METHOD_CODE></SHIP_METHOD_CODE>
First Group
<G_SALES_ORGN>
<STATUS>Awaiting Allocation</STATUS>
<SALES_ORGN>TET</SALES_ORGN>
<LINE_ID>1982</LINE_ID>
<LIST_G_ORDER_DETAILS>
<G_ORDER_DETAILS>
Second Group <SHIPPER_CODE></SHIPPER_CODE>
<PO>TEST ORDER#5</PO>
</G_ORDER_DETAILS>
<SORT_ORDER_VALUE>200009</SORT_
ORDER_VALUE>
</LIST_G_ORDER_DETAILS>
<ORGN>TET-200009</ORGN>
</G_SALES_ORGN>
<BOL_NO>12004</BOL_NO>
</LIST_G_SALES_ORGN>
<WHSE>T1</WHSE>
</T00404464>
<SORT_DT>28-FEB-08</SORT_DT>
<RQST_SHIPDT>28-FEB2008</RQST_SHIPDT>
<CUSTOMER_NAME>CONTECH
ATLANTA</CUSTOMER_NAME>
<CT_ST_ZP>CONYERS,
GA</CT_ST_ZP>

Developing RTF Template


The RTF layout can be designed using the Standard
features in Word.
Select

the size, font and alignment of text


Insert bullets and numbering
Draw borders around paragraphs
Include images (jpeg, gif, or png)
Use table auto formatting features
Insert header and footer
Use word page numbering

Developing RTF Template


Creating Placeholders
Two modes:
Basic

RTF method
Form Field method

Developing RTF Template


Creating Placeholders
Form Field method : Text form field is used to reference the
XML Data
Insert the form field using Forms toolbar
Text Form Field button

Developing RTF Template


Defining Groups
<?for-each: XML Group element tag name?>
<?end for-each?>

Developing RTF Template


Defining Headers & Footers
<?start:body?>
<?end body?>

Developing RTF Template


Inserting Images
Direct Insertion

Developing RTF Template


Headers and Footers

Native word headers


Header Template

Developing RTF Template


Inserting Images
URL Reference
ex: url:{http://sierra.com/images/logo.gif}
OA Media Directory Reference
ex: url:{${OA_MEDIA}/logo.gif}

Developing RTF Template


Tables

Developing RTF Template


Data Reporting features
Sorting fields
<?sort: ORGN?>

for multiple fields :


<?sort:ORGN?><?sort:ITEM_NO?>

Developing RTF Template-Conditional Formatting


Conditional Formatting
IF
IF-THEN-ELSE
CHOOSE--WHEN
<?if: condition?>
<?end if ?>
For eg: To get output only if the ship_method is LTL
<?if: ship_method =LTL?>
--table-<?end if?>

Developing RTF Template


<?choose:?>
<?when:ship_method=LTL?>
--table-<end when?>
<?when:ship_mehtod=OCEAN?>
--table-<end when?>
<?otherwise:?>
--table-<end otherwise?> <?end choose?>

Developing RTF Template


Regrouping Data
<?for-each-group: BASE GROUP;GROUPING-ELEMENT?>

For example to regroup the employee group on Ship_date


field
<?for-each-group: G_ORDER_DETAILS;SHIP_DATE?>

Developing RTF Template - Page

Totals

Page Totals
<?add-page-total: name;element?>
<?show-page-total: name;number format?>

For example
<?add-page-total: totsal:sal?>
<?show-page-total: totsal:$#,##0.00;($#,##0.00)?>

Extended SQL and XSL Functions


Extended SQL and XSL Functions

Syntax:
<?xdofx:expression?>

Examples:
<?xdofx:rpad(FIRST_NAME||LAST_NAME),30,'x')?>
<?xdofx:decode('xxx','bbb','ccc','xxx','ddd')?>
<?xdofx:Instr('abcabcabc','a',2)?>
<?xdofx:upper(char)?>

Developing RTF Template - Formatting


Page Breaks:
<?split-by-page-break:?>

Last Page Only


<?start@last-page:body?>
<?end body?>

End on Odd or Even Page


<?section:force-page-count;'end-on-even'?>
<?section:force-page-count;'end-on-odd'?>

Developing RTF Template - Variables


Declaration:
<xsl:variable name="lpp" select="number(5)"/>

Assigning Value:
<?xdoxslt:set_variable($_XDOCTX, 'variable name', value)?>

Get Value :
<?xdoxslt:get_variable($_XDOCTX, 'variable name')?>

XPATH Notations
Notation

Meaning

Current Node

..

Parent

//

all elements in the XML


document

Descendants

Attribute

[]

To specify conditions

Template Builder
The Template Builder is an extension to Microsoft Word

that simplifies the development of RTF templates

Functions:

Insert data fields into your RTF templates


Insert data driven tables
Insert data driven forms
Insert data driven charts
Preview outputs with sample XML data
Browse and update the content of form fields

Data Definition

Template Definition

Running XML Publisher Report

Running XML Publisher Report

XML Publisher Report PDF Output

Thank You

Вам также может понравиться