SUMMARY:
1. Develop the report without layout.
2. Register the report with Oracle applications in normal way.
3. While registering the report select the out put type as xml instead of text (in general we will give as text).
4. Assign to a request group.
5. Once after running the report from the application we will get the out put in the form of xml tags.
6. Save the Out put xml tags in file (this out put file will be the in put for the template generation).
7. Develop the Template and save it in .rtf format
8. Create Data Definition
9. Create the Template in Apps
10. Run the Report in the Apps
EXAMPLE I FIND IT WORKING...
XML Publisher Report
To create a XML publisher reports we need two things.
a. XML data
b. XML template
a. XML data
XML data can be created in two ways.
i) From already existing report.
ii)Using Stored Procedures (will be explained later)
i) From existing report.
Create a .rdf file and attach in the program. Set the output format as XML
(set ouput format from PDF to XML)
a. XML Template
After setting the output as XML we have to attach a XML template to that so that he output can be formatted. To Attach the XML template first we have to create a template file which will be in .rtf format
Creating a .rtf file
To create a .rtf file just have a sample output of XML as shown above.
Step 1: check Oracle XML publisher installed in the system. If yes, then Microsoft office will have a separate menu called Template Builder.
Step 2: Load XML data into the document. It will ask for the XML file. Select the file and load it. It will say ‘Data loaded successfully’
Step 3: Using Insert menu select the fields to be displayed.
Compare with report data model and Sample XML date.
To insert the field in the Template just double click the field. Then double click on the XML item to view the properties.
We can set the default text, Text format and also we can run a macro
Useful tags:
To insert field:
<?ENAME?>
To list records
<?FOR-EACH:G_EMPNO?>
To end the list
<?END FOR-EACH?>
Note : Make all the code in CAPS. For more information check the demos in the XML publisher.
Attach .rtf file to the application
Go to XML Publisher Administrator . If its not available add this responsibility to the corresponding user (OPERATIONS)
1. Create Data definition
We can preview data in PDF, HTML, XLS, RTF.
Before that we have to save the file as .rtf file.
Create a new definition
Code should be the programs Short name
2. Create Template
Give the same code and the data definition created.
Now it will automatically appear will submitting the request.
We can also change the output using rebuild / reprint option