The Data Template Definition The data template is an XML document that consists of four basic sections: 1. Define 2. Define 3. Define 4. Define
Parameters triggers Data Query Data Structure
This structure is shown in the following graphic:
To build XML report the following steps are involved.
Step 1: Design the Data Template XML File. Step 2: Create the Data Definition in XML Publisher and associate it with Data Template Step 3: Define a Concurrent Program to generate the Data XML File. Step 4: Define the RTF Template using the Generated Data XML. Step 5: Registering the Template with XML Publisher Step 6: Execute the concurrent program to generate the PDF report.
Step 1: Design the Data Template XML File.
<parameters> <parameter name="p_DeptNo" dataType="character" /> <sqlStatement name="Q1"> <element name="DEPT_NUMBER" value="DEPTNO" /> <element name="DEPT_NAME" value="DNAME" /> <element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()" /> <element name="LOCATION" value="LOC" /> <element name="EMPLOYEE_NUMBER" value="EMPNO" /> <element name="NAME" value="ENAME" /> <element name="JOB" value="JOB" /> <element name="MANAGER" value="MGR" /> <element name="HIREDATE" value="HIREDATE" /> <element name="SALARY" value="SAL" />
Save it as .xml
Step 2: Create the Data Definition in XML Publisher and associate it with Data Template
Step 3: Define a Concurrent Program to generate the Data XML File.
The short name in the above concurrent program is the code what you give while defining data definition.
Then run the above created concurrent program and get the xml output.
Save the output.
Step 4: Define the RTF Template using the Generated Data XML. Go to word document and design your rtf Template. Step 5: Registering the Template with XML Publisher.
Step 6: Execute the concurrent program to generate the PDF report.