Infolinks

Saturday, 21 July 2012

XML Publisher-report-from-rdf

XML Publisher Concurrent program - XMLP

In this blog post I will detail the step by step process of developing a XML publisher report using an RDF type report concurrent program in oracle apps.

The XML publisher windows desktop patch has to be applied in you PC before developing the XML template

Overview


          XML Publisher is a template based publishing solution by Oracle which allows us to create visually rich documents with numerous formatting options. (Available in ver.11.5.10)
          XML Publisher makes use of the data retrieved from Reports 6i.
          The template, designed by the developer is used as the layout for the report.
          The template will contain the layout with tags that are mapped to the data model of the report.
          At runtime the data from reports is merged onto the designed template to produce the final report.


Here it goes:
Before we see the step by step process, I will brief the main points:

       ·   Create a report and register it as Concurrent Program of type XML
       ·   Build a Data Definition & XML Template using XML Publisher
       ·   Create a relation between the XML Template & Concurrent Program



Develop a RDF Report concurrent program in oracle apps:

1.      Develop a RDF report and register it in oracle apps

·         Develop the Report (Report Name: Sample XML Report) Data model
·         Develop the Report Layout model
·         Define the RDF executable



·         Define the concurrent program

·         Assign this concurrent program to a responsibility

The RDF report concurrent program is complete, now we have to get the XML data file from the concurrent program and create the .xml file:

2.      Run the report from a responsibility after changing the output format of the concurrent program to XML.

·         Go to the concurrent program definition and change the output format of the concurrent program





·         Run the concurrent program





·         The XML data output of the concurrent program will look like this pic below

If you map the oracle report data model and the xml data file. It will look like this

·         Save this XML data file as filename.xml say FNDWRR.xml

Create the .rtf file. Before you do this, check whether XML publisher desktop patch is applied in your local machine. check the blog post for installing the XML publisher desktop patch: 
http://oracleapps4u.blogspot.com/2011/04/installing-oracle-bi-publisher-xml.html

3.       Load the XML data file to MS Word and save it as .rtf file


·         Load the XML file (FNDWRR.xml) into MS-Word



·         Using table wizard, form the template layout









If you map the xml data file to the word template. It will look like this
We can develop the template layout with out the table wizard, by marking up the text form fields with the corresponding tags. 

11. Insert a Text Form Field from the Forms tool bar (ViewàToolbarsà Forms)
2. Place the Text Form field in a position where you desire.
3. Double click on the form fieldàClick on the Add Help Text button.
4. Go to the Status Bar Tab and type your tag in the text field available.

It will look like this




·         Save the file in .rtf extension, say XXSMPRTF.rtf



A Bit of XML publisher

1.      Go to “XML Publisher Administrator” Responsibility and define the XML Data Definition & XML Template. Also create a relation between the XML Template and the concurrent program.



·         Create the data definition
Define the values as below:
Name: Sample XMLP Report – XML Output (Any Unique name in the Application)
Application: Receivables (Any Application)
Code: XXSMPRPT (This should be same as the Concurrent program short name)
Start Date: Leave default (sysdate)


  
·         Create the template
Define the values as below:
Name: Sample XMPL Report Template (Any Unique name in the application)
Application: Receivables (Any Application)
Data Definition: Sample XMLP Report – XML Output (This should be same as the XMLP Data Definition Name)
Code: XXSMPTMP (Any Unique name)
Start Date: Leave Default (sysdate)
Type: RTF
Default Output Type: PDF (As your wish)



·         Create relation ship between the XML Template and the concurrent program

In the XML Data Definition the Data Definition code should be same as the concurrent program short name. As the XML Template has the XML Data Definition name, this actually creates a relationship between the XML Template and the concurrent program.

Concurrent program
XML Data Definition
XML Template
Code: XXSMPRPT
Code: XXSMPRPT


Name: Sample XMLP Report – XML Output

Name: Sample XMLP Report – XML Output


·         Now run the concurrent program. The program output will be displayed as PDF file.




No comments:

Post a Comment