Please tick the box to continue:


Oracle XML Publisher and Template Builder for Microsoft WordPresenter : Sai Narayan Date : 25-June-08

Presenter Name Date DD/MM/YYYY

XML Publisher Paradigm Separates data/layout/output format

Data LogicXSL


LayoutXML Publisher


Report Output

XML Publisher Benefits Templates can be designed by functional user using familiar desktop tools Reduced maintenance costs Enhancements like font changes/logo changes etc can be done by functional user Flexibility of output PDF, Excel, HTML

Getting Started Download and Install Oracle XML Publisher Desktop Patch 5.6.3 Patch # 5887917 Patch contains Template Builder and Template Viewer Template Builder Is an extension to Microsoft Word Allows development of RTF templates Template Viewer Provides report preview capability

Template Builder The template builder is an extension to your Microsoft Word It is available in the menu and toolbar

Process Overview Set the E-Business Report to generate XML output Run the concurrent program using SRS to obtain sample XML output Design your template using Microsoft Word Template Builder Use Template Viewer with sample XML output to finetune template Register E-Business Report as Data Definition using Template Manager Register and upload template using Template Manager Assign the template to the data definition code Lets rock !

Set E-Business Report Output Format Navigate as System Administrator->Concurrent->Program->Define Set Output Format to XML and save

Run E-Business Report for Sample XML Output Run the E-Business report. For example, say Invoice Print (Receivables) Click on output and save the XML output to a file

Sample XML Output File Note the structure of the XML file

Designing the layout Get the requirements Decide how the report layout should look like on paper For example, say the Receivables invoice needs to look like this (at least part of it)

Template Builder XMLP Directives for-each loop data fields page header/footer page numbering sorting page breaks calculated fields extended functions conditional logic images/logos Dynamic data columns Rows per page Last Page Only content Re-grouping xml data Cell highlighting Page totals

for-each loop Define groups to notify XML Publisher to loop through repeating information Insert the following tag before the first element Insert the following tag after the last element E.g. The XML group element tag name G_INVOICE for recurring invoice information invoice lines

Data fields Placeholders map the template field to the XML data field Syntax - Placeholder must match XML element tag name exactly Case sensitive E.g. The placeholder identifies the Invoice Number

Page Header/Footer Enclose the body area of the report within the following tags Elements occurring before the tag compose the header Elements occurring after the tag compose the footer

Page Numbering Use Microsoft Word page numbering From Insert menu, select Page Numbers Select the position, alignment and format as desired

Sorting Insert sort tag within the group , for example to sort by transaction number Enter the following after the No end tag Sort on multiple elements possible, use multiple sort tags Example: Sort on calculated fields supported

Additional Sorting Sort order descending Data type sorting Number Date Separated by semi-colon (;)

Page Breaks Just before the tag either Insert a Microsoft Page Break Insert->Break->Page Break -or + Use XML Publisher directive This avoids extra blank page at the end of report

Calculated Fields Use field names and operand(s) + - Addition - - Minus * - Multiplication / - Division Example Not required to be in form field

Extended functions Some SQL functions can be used in template RPAD, LPAD, REPLACE INSTR, SUBSTR, LENGTH DECODE SYSDATE TO_NUMBER, TO_CHAR UPPER, LOWER GREATEST, LEAST ROUND, CEIL, FLOOR Usage is It is NOT case sensitive Not required to be in a form field

Conditional logic Support for IF and CASE statements IF Example : to display only invoice lines with a line type of LINE Enclose the invoice line output within the tags below CASE

Images/Logos Use a table for complete control of image behavior Static Images Paste the image directly into layout template URL Dummy image on template Specify URL in alternative text section Double click on image, go to web tab, alternative text field url:{} Server-side Images (in EBS) Dummy image on template Specify URL in alternative text section url:{${OA_MEDIA} /myimage.gif} Also supported URLs and Paths in XML elements or combination of elements BLOBS from database

Dynamic data columns Dynamic Column Header Dynamic Column Data Example: Print departments in column header and demand qty as column data Column header Column data

Rows per page Define row counter variable in a form field Increment counter for each line (again in a form field) Break if the number of rows is reached (say 6 rows in this example) Content on the page above and below these tags will appear only on last page Headers or footers previously defined for the report must be reinserted on the last page

Re-grouping XML Data Not limited by the structure of the data source Use the tags Can establish nested groupings Example: CD Catalog XML data is grouped by CD. To change to group by country, use the syntax below:

Cell highlighting Native XSL embedded within XMLP using xdofo:ctx component Example: Change cell color to red if debit amount > 1000

Related Documents