Sie sind auf Seite 1von 38

XML Publisher

A Template-based Reporting Solution

HRCS Release 9.0


XML Publisher Overview

Oracles Java-based reporting technology


built on open standard technologies (XML, XSL-FO, etc)
separation of the data extraction process from the report layout
enables power business users to adjust report templates without involvement of
IT resources; hence, reduced maintenance
can generate reports in industry standard formats (PDF, RTF, HTML, etc) using
single template
XML Publisher Integration

XML Publisher in Peopletools 8.48

Design Time Environment


for managing templates, data sources, reports,
translations, and content components (subtemplates)

Run Time Environment


provides a set of Peoplecode XML Publisher classes
for runtime report generation
XML Publisher Process

XML Data Template

XML Publisher

Reports
How to supply XML data to XML Publisher
Data Sources

XML File XML Doc Rowset PSQuery


-modify SQR -Peoplecode -Peoplecode -PS Query

-create new SQR

-others

XML Data File


Must resolve into an XML data file !!
Sample XML Data File
<?xml version="1.0" encoding="UTF-8"?>
<USA_YearEnd>
<W2_Data>
<EMPLID>TQ1986</EMPLID>
<ER_EIN>95-3856571</ER_EIN>
<Box_Year>2005</Box_Year>
<ER_Name>COMPANY TQA</ER_Name>
<ER_Address1>1400 CALIFORNIA ST</ER_Address1>
<ER_Address3>xxxxxxxxxxxxxxxxxx</ER_Address3>
<EE_SSN>007-22-0393</EE_SSN>
<EE_FirstName>John</EE_FirstName>
<EE_LastName>Smith</EE_LastName>
<EE_Address1>983 RIESLING DR.</EE_Address1>
<Fed_Wages>30063.00</Fed_Wages>
<Fed_Tax>9672.06</Fed_Tax>
<SS_Wages>30063.00</SS_Wages>
</W2_Data>
</USA_YearEnd>
XML Schema - .xsd
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="USA_YearEnd">
<xs:complexType>
<xs:sequence>
<xs:element name="W2_Data">
<xs:complexType>
<xs:sequence>
<xs:element name="EMPLID" type="xs:string" />
<xs:element name="ER_EIN" type="xs:string" />
<xs:element name="Box_Year" type="xs:unsignedShort" />
<xs:element name="ER_Name" type="xs:string" />
<xs:element name="ER_Address1" type="xs:string" />
<xs:element name="Control_Number" type="xs:string" />
<xs:element name="EE_SSN" type="xs:string" />
<xs:element name="EE_FirstName" type="xs:string" />
<xs:element name="EE_LastName" type="xs:string" />
<xs:element name="Fed_Wages" type="xs:decimal" />
<xs:element name="Fed_Tax" type="xs:decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XML Publisher Process

9 XML Data Template

XML Publisher

Reports
How to construct report layout (template)

Template Types
PDF Templates (use Adobe Acrobat)
add form fields in areas of report that are expecting
application data
RTF Templates (use MS Word)
XML Publisher Template Builder plug-in
insert data field tags
Others (eText, XSL)

Download third-party templates from govt sites, etc. (e.g., W-2s,


T4s.) !!
Sample W-2 template
XML Tags vs. Form Fields
<USA_YearEnd>
<W2_Data>
<BATCH_ID>00001</BATCH_ID>
<EMPLID>TQ1986</EMPLID>
<ER_EIN>95-3856571</ER_EIN>
</W2_Data>
</USA_YearEnd>
XML Publisher Process

9 XML Data Template 9

XML Publisher

Reports
Running XML Publisher Reports

Use Query Report Viewer/Scheduler for


query-based reports
Main Menu > Reporting Tools > XML Publisher > Query Report Viewer
Main Menu > Reporting Tools > XML Publisher > Query Report Scheduler

Use Peoplecode XML Publisher Classes for


all data sources
XML Publisher Process

9 XML Data Template 9


For RTF/XSL templates
Output formats are:
.PDF, .RTF, .html, .xls
XML Publisher 9
For PDF templates
Output format is .PDF

For eText templates Reports 9


Output format is .txt
Business Process Flow
Data Source
Design:

M ock up Id e n t if y o r c r e a t e
R e p o rt D a ta S o u rc e R e g is t e r D a t a S o u r c e
w it h X M L P u b lis h e r

D e te rm in e d a ta P S Q u e r y fo r b u s in e s s u s e r M a k e D a ta S o u r c e a v a ila b le
r e q u ir e m e n ts fo r r e p o rt A n y X M L s o u rc e fo r r e p o rt d e v e lo p e r fo r X M L P u b lis h in g
Template & Report
Design:

C r e a te P r e v ie w a n d
D o w n lo a d S c h e m a
R e p o rt tw e a k u n til R e g is te r X M L P R e p o r t
& S a m p le D a ta
T e m p la te c o m p le te D e fin itio n

T o fa c ilita te W o rd R T F o r A s s o c ia te D a ta
te m p la te d e s ig n Adobe PD F S o u rc e & T e m p la te O p tio n a l: C r e a te
T r a n s la tio n
Request & View
Runtime:

P u b lis h
V ie w p o s t in g in
X M L P -b a s e d
R e p o rt M a n a g e r
R e p o rt

C a lls X M L S e c u r e d to Offline Existing New


P u b lis h e r e n g in e s p r o p e r v ie w e r
Bursting separate report files
Use for security &
for distribution Bursting by Empld
<PayChecks>
<PayCheck>
<EmpId>1000</Empld>
<DeptId>01</DeptId>
<Salary>1000</Salary>
</PayCheck> EmplD: 1000 EmplD: 1001 EmplD: 1002
<PayCheck>
<EmpId>1001</Empld>
<DeptId>01</DeptId> Bursting by Deptld
<Salary>1000</Salary>
</PayCheck>
<PayCheck> EmpId:
EmpId:
<EmpId>1002</Empld> 1000
1002
<DeptId>02</DeptId> 1001
<Salary>1000</Salary>
</PayCheck>
DeptId: 01 DeptId: 02
</PayChecks>
Simple online flow
Make a data source available for XMLP

Main Menu > Reporting Tools > XML Publisher > Data Source
Define XML Publisher Report

Main Menu > Reporting Tools > XML Publisher > Report Definition
Add template file to Report Definition

Main Menu > Reporting Tools > XML Publisher > Report Definition
Specify Output Choices

Main Menu > Reporting Tools > XML Publisher > Report Definition
Add Bursting to Report Definition

Main Menu > Reporting Tools > XML Publisher > Report Definition
Generating the report

Batch Process
Developer creates process and Run Control page to
connect data extraction process with XMLP report
generation process
Online
Developer creates page/component for requesting
report to be generated for online viewing
Report Generation

9 Report is produced by
Calling XMLP API via Peoplecode and passing
Report Definition as parameter

XML Publisher merges XML data file with


template to produce report in PDF (or other)
format
Data within open/close Tags in XML data file are placed in matching
(mapped) template Form Fields
Notes on Security
Who can view the reports ?

Main Menu>Reporting Tools>XML Publisher>Report Definition


Notes on Security
Who can view the reports ?

Main Menu>Reporting Tools>XML Publisher>Report Definition


More Features Sub-Templates

Reusable content, such as text, images, or logic, can be


maintained in sub-templates

Sub-template files are referenced with standard XSL


commands in the primary template file

Sub-template functionality available only with primary RTF


and XSL templates

Reusable sub-templates are maintained in Content Library


More Features Translation

Template Translation feature based on standard XML


Localization Interchange File Format (XLIFF)

XLIFF is XML-based format that enables translators to focus


on text to be translated.

Available only for RTF templates

Creates translation file (.xlf) that contains templates static


headings and body text for translation
More Features Translation
Reporting Tools > XML Publisher > Translations

Click on Generate Translatable File button


More Features Translation
<?xml version = '1.0' encoding = 'utf-8'?>
<xliff version="1.0">
<file source-language="EN" target-language="FR" datatype="XDO"
original="orphan.xlf" product-version="orphan.xlf" product-name="">
<header>
<prop-group name="ora_reconstruction">
<prop prop-type="TemplateCode">n/a</prop>
<prop prop-type="extractorVersion">5.6.2_115.23</prop>
</prop-group>
</header>
<body>
<trans-unit id="dfe92c8a" maxbytes="4000" maxwidth="20"
size-unit="char" translate="yes">
<source>Menuname</source>
<target>Menuname</target>
<note>Text located: body/table/table header</note>
</trans-unit>
</body>
</file>
</xliff>
More Features Translation
More Features Translation
XML Publisher Managed Objects

Data Sources
Templates
Report Definitions

Run SYSAUDIT.sqr
sysxmlp.sqc
Example
Report Definition: XRFWIN (query-based)

Online Solution:
Main Menu > Reporting Tools > XML Publisher > Query Report Viewer
Example
Report Definition: XRFWIN (query-based)

Batch Solution:
Main Menu > Reporting Tools > XML Publisher > Query Report Scheduler
References

Link to Oracles XML Publisher web site:

http://bipublisher.us.oracle.com/

Peopletools 8.48 Peoplebooks:

Peoplecode API Reference


XML Publisher for Peoplesoft Enterprise

Das könnte Ihnen auch gefallen