Вы находитесь на странице: 1из 12

XML Publisher: A Step By Step Approach using Oracle Reports

Author(s) Ajit Maski

Date written (DD/MM/YYYY) 22/05/2009 Declaration I hereby declare that this document is based on my personal experience. To the best of our knowledge, this document does not contain any material that infringes the copyrights of any other individual or organization including the customers of Infosys. Ajit Maski Project Details

Project involved H/W Platform S/W Platform Application Type

: ARWNAC : Windows XP : Oracle Apps R12.0 : Oracle Development

Document Description This document is an effort towards understanding the following: 1. XML Publisher. 2. A simple way to create XML publisher using Oracle Reports. Target Readers Oracle Apps Developers with basic understanding of both Oracle Apps and Oracle Reports. Keywords XML Publisher, XMLP, Oracle Apps, Concurrent Program. Table of Contents Introduction Prerequisite Step by step creation Table creation with sample records. Report creation FTP report to reports directory. Concurrent program creation

Building Template using XML Publisher desktop Creating Data Definitions and Templates Viewing the output References Introduction XML Publisher is a template based reporting tool provided by Oracle. XML Publisher is a Java based product in Oracle Fusion Middleware family. Maintaining data and template separately it gives advantage over Oracles traditional reporting tools like Oracle Reports, Discoverer etc. We can develop our custom template (using MS-Word, Adobe acrobat etc.) to suit the business needs. Prerequisite XML publisher desktop should have been installed on the PC along with MSWord. Step by step creation Table creation with sample records. Create table EMP1 with below details. Create Table Emp1 (EMPNO NUMBER, ENAME VARCHAR2 (20), DEPTNO NUMBER); Insert records into table EMP1. Insert into Insert into Insert into Insert into Commit; Report creation Create a plain report using Oracle Report builder. Select all columns from EMP1 table. Emp1 Emp1 Emp1 Emp1 values (1, 'RAM', 10); Values (2, 'SITA', 10); Values (3, 'SHYAM', 20); Values (4, 'GOPAL', 20);

Add three parameter to the report viz. P_CONC_REQUEST_ID, P_RESPONSIBILITY_ID, P_USER_ID. It will help report to run as concurrent program.

Save the report as XX_EMP1.rdf FTP report to reports directory. FTP this XX_EMP1.rdf to $INV_TOP/report/US location.

Concurrent program creation Define a concurrent program executable for this report with below details.

Define a concurrent program with below details. Keep program name, short name and executable name as XX_EMP1. Format should be XML and style should be landscape.

Register this concurrent program with a request group that belongs to Inventory application.

Submit a request for this concurrent program.

After the request is completed successfully, we can view the output as below. Save this file as an XX_EMP1.xml

Building Template using XML Publisher desktop Install the XML publisher desktop software to your PC. This is an Oracle tool used to read XML and create fields automatically. Open MS-Word . Click on Data Load XML Data.

Open the recently saved XX_EMP1.xml file you will get below message box.

Click on Insert Table/Form Wizard.

Select Table, Click Next for the below screens.

Select all fields and press >>

We can change the label. Click Finish.

We will get the layout as below on MS-Word.

Save the file as XX_EMP1.rtf

Preview the report output by selecting Preview menu.

Sample report output.

Creating Data Definitions and Templates We need to select XML Publisher administrator responsibility to create Data Definition and Templates. (If XML Publisher administrator responsibility is not available, it should get added to your user.)

Click on Create data definition.

Add Name as XX_EMP1, code as XX_EMP1, application as Inventory and start date as today date. Click Apply.

Select Tab Template. Click on create Template. Add Name as XX_EMP1, code as XX_EMP1. Select Application as Inventory and data definition as XX_EMP1. Add type as RTF and start date as today date. Browse the template (in .rtf format) we have created in previous steps. Select Language as English. Click on Apply.

After successful creation of Template, below screen will be appeared.

Viewing the output. Navigate to Inventory responsibility and submit the report XX_EMP1. View the output, An output file will be appeared as below.

References www.oracle.com

Вам также может понравиться