XML Publisher Reports oracle Apps
Overview
XML
Publisher, which is also called Oracle Business Intelligence Publisher (BI
Publisher), is a template-based reporting tool that leverages standard
technologies for data extraction and display. Business users can build the
layout and rules for the report themselves by using common desktop tools.
Development engineers can concentrate on extracting data in the most efficient
manner. Deployment time is faster. Also, business users with minimal training
can design templates and reports based on the data sources provided by
engineers, thus greatly reducing the cost of ownership.
XML Publisher separates a reports data, layout and
translation components into three manageable pieces at design time; at runtime
all the three pieces are brought back together by XML Publisher to generate the
final formatted, translated outputs like PDF, HTML, XLS and RTF. In future, if
any there is any change in layout we just need to add/modify the Layout file.
Data
Logic: Data
extracted from database and converted into an XML string.
Layout: The layout templates to be
used for the final output are stored and managed in the Template Manager.
Translation: The translation handler will
manage the translation that is required at runtime
In brief the steps are as follows:-
a. Create a procedure and register it as Concurrent Program so that we write
a. Create a procedure and register it as Concurrent Program so that we write
XML tags into output file.
b. Build a Data Definition & XML Template using XML Publisher.
c. Create a relation between XML Template & Concurrent Program and run the concurrent
b. Build a Data Definition & XML Template using XML Publisher.
c. Create a relation between XML Template & Concurrent Program and run the concurrent
program
Requirements
for XML Data Object Reports
- Oracle XML Publisher
- Template Builder
When you download the XML Publisher Desktop edition you get
a Zip file containing setup for XML Publisher Desktop Install Shield, this
installs some components into Microsoft Word. After installing, the Word Add-Ins is attached to the menu
bar for the word document. This menu lets you attach an XML data source
document, add the XML data to your template, set preferences and preview the
output.
So
let us take a look at how we can create xml report from xml data template.
The
XML data template is an XML document that consists of four basic sections:
- Parameters
- Triggers
- Data Query
- Data Structure
This
structure is shown in the following graphic:
If you see the above XML Data Template, we have specified
the parameters that are being used and also the SQL Query that will be fetching
the data. The SQL Query is using the parameters that are being defined under
the Parameters Section. I have also included a jpeg image of the XML
File Definition. Save the same as “.xml” file in your local system. After
saving the file, you should be able to open it in the browser. Double click the
xml file and the file should open.
Now,
navigate to System Administrator > Concurrent > Program > Define.
Create a
new Concurrent Program and give the details. The Executable should always
be XDODTEXE and output format should XML. After creation of
concurrent program assign the program to the request group.
Now,
Go to XML Publisher Administrator responsibility
and create a new Data Definition. Give the following for the fields:
Code name = concurrent program short name
Application
– Provisioning (or your custom application)
Start
Date – Automatically Populated
Press “Add File” next to Data Template. Browse and
upload the XML Data Template that we have created here.
Go to
Data Templates tab and create a new Data Template. Give the following details:
Code name = concurrent program short name
Select
the Data Definition that we had created prior to this.
Select
Language as US English and upload the RTF File that we have created
(Template_file.rtf)
Now,
all set to get your report output. Go to responsibility where you have assign
the program and run the report by providing required parameter.
Hope this helps. Let me know your thoughts and feel free to
ask any questions that you might have. Also, check out the next blog which has
Triggers being called from the XML Template file.