Beruflich Dokumente
Kultur Dokumente
IBM India
To Discuss on
XML Publisher What and Why Requirements Development Approach
-
- Development Steps using PL/SQL - Different PL/SQL Approaches - Development steps using data template
IBM India
IBM India
IBM India
Data logic
Layout
Report file
Translation
Less flexibility High Development Cost High Customization Cost Difficult Upgrade
IBM India
Translation
Report output
IBM India
IBM India
Requirements..
Creating reports using XML Publisher can be divided into two components: Report Query (XML) and Template (Layout). XML Publisher Administrator Responsibility Report Query can be developed using:
-
Reporting tool like Oracle Reports6i PLSQL program (Packaged procedure) Data Template (Also Known as XDO Reporting) Template Builder provided by Oracle
(The tool needs to be installed on your desktop, which provides add-on toolbar in MSWord.)
IBM India
Development Approach
IBM India
Development Steps
Here it is assumed that report query will be developed using Oracle reporting tool and layout is RTF template
1. 2. 3. 4. 5. Create and register report as concurrent program Generate the XML file and download it in development work space Design the template Map the template with XML file tag Register the data definition and template
10
IBM India
11
IBM India
12
IBM India
13
IBM India
Design Template
14
IBM India
Placeholders
Individual Fields, e.g. PO Number Vendor Name Product Description
Groups
Repeating Elements, e.g. PO Lines Purchase Orders
15
IBM India
Map Template
16
IBM India
Basic RTF
17
IBM India
18
IBM India
1.
2.
3.
The Application must match that of the report The Code must match the Short Name of the report Attach a sample of your XML output to preview and test your template
19
IBM India
Register Template
1. The Application must match that of the report The Type must match the file type of your design A Data Definition is Required, but it may simply be a placeholder However, by loading sample XML, you can preview the template You can add different templates for each language and region
2.
3.
4.
5.
20
IBM India
Print Report
21
IBM India
Finished Result
22
IBM India
For defining Groups <?for-each:XML group element tag name?> <?end for-each?> e.g. <?for-each:G_DEPT?> end for-each?> <?
For Header and Footer <?start:body?> and <?end body?> For Conditional Formatting <?if:condition?> <?end if?> e.g. <?if:cs_no_data_found=1?>*** NO DATA*** <?end if?> <?xdofx:if element_condition then result1 else result2 end if?> e.g. <?xdofx:if AMOUNT > 1000 then High else if AMOUNT < 1000 then Low else Equal end if?> For Page Totals <?add-page-total:TotalFieldName;element?> <?show-page-total:TotalFieldName;number-format?> For Defining Variable <?xdoxslt:set_variable($_XDOCTX, RTotalVar, 0)?> <?xdoxslt:get_variable($_XDOCTX, RTotalVar)?>
23
IBM India
24
IBM India
25
IBM India
26
IBM India
27
IBM India
For nesting of tags there is a cursor function available e.g. SELECT DBMS_XMLGEN.getxml ('select deptno, dname, cursor(select ename, job
from emp e where e.deptno = d.deptno) emp_row from dept d where rownum < 4' ) xml FROM DUAL ;
Text Document
28
IBM India
s le q ry o t u ing _ ue _ u p t
mu ltiple qu erry
29
IBM India
30
IBM India
Thank You
31