Thursday, July 7, 2011

Create XML Publisher Reports based on D2K RDF


1) Write the RDF with the query to get the required output.
2) Register the executable with Apps. Note the Executable name.

3) Register the Concurrent Program with Apps. Check the output to XML

4) Just Run the report to get the XML output. Save the output file to local disk. We will use this while generating the template.


7) We need to create a Data Definition for this object in XML Publisher. To do this, log into Application with "XML Publisher Administrator" responsibility. Click on "Data Definition" function.

While creating Data Definition, ensure that the Data Definition Code remains SAME as the Concurrent Program Short Name. This allows Concurrent manager to bind the output of Conc report prog output to the template, by finding same name template.
Upload the template in Template manager.

 
9) Voila !! We are done with the setup and just need to run the concurrent program to generate the output in PDF. When we raise the concurrent request, the Concurrent manager looks for a Template with the same Data Definition code as the Concurrent Program short name and binds the XML data with the template a Runtime to generate the required output.






With a little more work on the Template, we can improve the output look based on the requirement without ever having to touch the code.
This is how output would look like :
8) Now we need to register this template with XML Publisher. Click on the "Templates" tab.
Fill all the required information. Select the Data Definition we created above. Select the language as English and leave territory empty.
6) Now we will create a Template using Oracle XML Publisher Desktop Client. Open a New RTF file and save it. (See guide to learn more on creating RTF templates).
5) XML Data looks something like this :

No comments:

Post a Comment