XMLPresentation
XMLPresentation
XMLPresentation
Presented by:
Madhav Vinay Kumar Viswanath Vijayalaxmi
XML/BI
Publisher
Agenda
Introduction Basic need and benefits of XML Flow Template Builder XMLP Directives XML/BI Bursting in R12
XML/BI Publisher
History
Oracle XML Publisher is Oracle Corporations latest reporting technology. It was originally developed to solve the reporting problems faced by Oracle Applications. Osama Elkady from the Applications Technology Group and Tim Dexter from the Financials Group were the main drivers for the product. It was first released with Oracle E-Business suite 11.5.10 in 2003. Since then it has been integrated into most of Oracle Products including JD Edwards Enterprise One application and PeopleSoft Enterprise, and as a standalone version, XML Publisher Enterprise with no dependency on Oracle Applications. When XML Publisher became part of the Oracle BI Enterprise Edition Suite it was re-branded as Oracle BI Publisher. BI Publisher separates the creation of data from the process of formatting it for different uses. The engine can format any well-formed XML data, allowing integration with any system that can generate XML, including Web Services or any data source available through JDBC. BI Publisher can merge multiple data sources into a single output document.
XML/BI Publisher
Introduction
Oracle XML Publisher offers you the most efficient, scalable reporting solution available for complex, distributed environments. It provides a central architecture for generating and delivering information. It reduces a company's dependency on third party software systems that are required to format business documents
Template Builder
Template Viewer
XML/BI Publisher
XML/BI Publisher
Benefits of XML/BI:
Multiple document output formats Report layouts developed and maintained using familiar desktop applications Oracle XML Publisher reduces the cost associated with the development, customization and maintenance of business documents while increasing the efficiency of reports management. Reduce the cost and complexity by eliminating third party Software Developed completely on open standards Large number of supported document delivery channels and protocols Enables end users to format batch application output using Oracle XML BI Publisher supports the Oracle technology stack It provides a reporting solution migration path for Oracle Fusion Faster report creation Layout level Formatting
XML/BI Publisher
Version of XML
XML/BI Publisher
XML/BI Publisher
Another way to find the Version PDF Output : open the file in Adobe Acrobat Navigation file --> Properties --> PDF Producer
XML/BI Publisher
XML/BI Publisher
Layout
XML Publisher
Translation
Report Output
XML/BI Publisher Data Logic: Data extracted from database and converted into an XML string. Data Sources to generate XML reports in following ways: 1) Through RDF data model 2) Through Stored Procedure 3) Through XML Tags Layout: The layout templates to be used for the final output are stored and managed in the Template Manager. Translation: The translation handler will manage the translation that is required at runtime.
XML/BI Publisher
XML/BI Publisher
Normal Text
XML/BI Publisher
Insert a form field, put in description, click Add Help Text, and put text in the text area below
XML/BI Publisher
XML/BI Publisher
XML/BI Publisher
for-each loop:
Define groups to notify XML Publisher to loop through repeating information Insert the following tag before the first element <?for-each:XML group element tag name?> Insert the following tag after the last element <?end for-each?> E.g. The XML group element tag name G_INVOICE for recurring invoice information
<?for-each:G_INVOICE?> invoice lines <?end for-each?>
XML/BI Publisher
Data fields: Placeholders map the template field to the XML data field Syntax - <?XML element tag name?> Placeholder must match XML element tag name exactly Case sensitive E.g. The placeholder <?TRX_NUMBER?> identifies the Invoice Number
XML/BI Publisher
Page Header/Footer:
Enclose the body area of the report within the following tags <?start:body?> <?end body?> Elements occurring before the <?start:body?> tag compose the header Elements occurring after the <?end body?> tag compose the footer
XML/BI Publisher
Page Numbering:
Use Microsoft Word page numbering Navigation is: From Insert menu, select Page Numbers Select the position, alignment and format as desired
XML/BI Publisher
Sorting :
Insert sort tag within the group <?sort:element name?>, for example to sort by transaction number
Enter the following after the <?for-each:G_INVOICE?> <?sort:invoice_number?>
No end tag Sort on multiple elements possible, use multiple sort tags
Example: <?sort:invoice_number?><?sort:hire_date?>
XML/BI Publisher
Example:
XML/BI Publisher
You may require the output to be sorted in the Inventory Item ID in ascending order. For this we have to include a tag.
XML/BI Publisher
And the tag below the available tag and Press OK
XML/BI Publisher
XML/BI Publisher
Page Breaks:
XML/BI Publisher
Calculated Fields:
Use field names and operand(s)
+ * / - Addition - Minus - Multiplication - Division
XML/BI Publisher
ADDITION You can perform mathematical operations in the tag itself. Let us create a new column to show the addition of INVENTORY_ITEM_ID with 5. In the Template, Create one Column and write the tag in it.
XML/BI Publisher
Output
XML/BI Publisher
Row Striping
If you would like a striped effect on your rows this can be achieved in the template. We now use two almost identical data rows in the table. The native XSL position() function is used to assign each row a numeric value, an if statement is then used to test the value, so at the beginning of each row we get an if statement: 1st Row: if:position() mod 2=0 2nd Row: if:position() mod 2=1 The position() function will return a number for the row of data starting at 1. The mod or modulus function will return a 0 or a 1 depending on the result e.g. 2 mod 2 returns 0 and 3 mod 2 returns a 1. So we shade each row as required and add the if statement and at runtime the rows will be alternately shaded, in this case blue and yellow.
XML/BI Publisher
The output is
XML/BI Publisher
XML/BI Publisher
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
XML/BI Publisher
Conditional logic:
Support for IF and CASE statements IF <?if:boolean_test?> <?end if?> Example : to display only invoice lines with a line type of LINE Enclose the invoice line output within the tags below <?if:LINE_TYPE='LINE' ?> <?end if?> CASE <?choose?> <?when:boolean_test?> <?end when?> <?otherwise?> <?end otherwise?> <?end choose?>
XML/BI Publisher
Conditional Formatting
Conditional formatting occurs when a formatting element appears only when a certain condition is met. XML Publisher supports the usage of simple "if" statements, as well as more complex "choose" expressions. Insert the following syntax to designate the beginning of the conditional area. <?if:condition?> Insert the following syntax at the end of the conditional area: <?end if?>. Let us create a new template for this purpose and Load the data into it. Add the if statement into it
XML/BI Publisher
XML/BI Publisher
IF-THEN-ELSE XML Publisher supports the common programming construct "if-then-else". This is extremely useful when you need to test a condition and conditionally show a result. Let us write a new Query for if-then-else in the old template itself. Use the following syntax to construct an if-then-else statement in your RTF template: <?xdofx:if element_condition then result1 else result2 end if?>
XML/BI Publisher
Type the tag as a single line *Dont use Enter Anywhere+ The Result is as per our requirement
Choose Statements Use the choose, when, and otherwise elements to express multiple conditional tests. This is a very powerful feature of the RTF template. In regular XSL programming, if a condition is met in the choose command then further XSL code is executed.
XML/BI Publisher
Use the following syntax for these elements: <?choose:?> <?when:expression?> <?otherwise?> Let us create a new template for this purpose. In the Template, write the Coding,
XML/BI Publisher
What our requirement is, If the Inventory_item_id = 11816, then, the contents to be highlighted in Blue color. Output is
Let us proceed with another condition in it. If the Inventory_item_id = 12816, then the words are to be highlighted.
XML/BI Publisher
The Output is
XML/BI Publisher
Now, Use otherwise into it. All the Records to be Highlighted in red Color.
XML/BI Publisher
The Output is
XML/BI Publisher
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:,www.myspace.com/xml_example/myimage.gif 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
XML/BI Publisher
<?end if?
XML/BI Publisher
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
XML/BI Publisher
Example: CD Catalog XML data is grouped by CD. To change to group by country, use the syntax below:
<?for-each-group:CD:COUNTRY?>
XML/BI Publisher
Cell highlighting:
Native XSL embedded within XMLP using xdofo:ctx component Example: Change cell color to red if debit amount > 1000
<?if:debit>1000?> <xsl:attribute xdofo:ctx="block name="background-color">red </xsl:attribute> <?end if?>
XML/BI Publisher
Page totals:
Declare variable to hold page totals, following data element declaration
<?add-page-total:TotalFieldName;'element'?>
<?debit?><?add-page-total:dt;'debit'?>
Insert the show page total syntax in the page footer
1) Through RDF data model 2) Through Stored Procedure 3) Through XML Tags
XML/BI Publisher 1.Process Overview(through RDF Report) 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
XML/BI Publisher
Process Diagram
XML/BI Publisher
Create a report and register it as Concurrent Program of type XML Build a Data Definition & XML Template using XML Publisher Create a relation between the XML Template & Concurrent Program
XML/BI Publisher
Registration
First develop a report data model based on requirement. Then save the file name with extension '.rdf'. Then move that file into server in appropriate top. Make executable file and method as oracle reports and define concurrent program of type xml.
XML/BI Publisher
Add Concurrent program to appropriate responsibility. Then go to that responsibility and submit a request through SRS WINDOW Run the concurrent program
XML/BI Publisher
XML/BI Publisher If you map the oracle report data model and the xml data file. It will look like this
XML/BI Publisher
XML/BI Publisher
Load the XML data file to MS Word and save it as .rtf file
XML/BI Publisher
XML/BI Publisher
When we click on Insert-->Field button the following form will be displayed. Then we can insert fields into appropriate columns.
XML/BI Publisher
Standard Templates
desktop applications
Adobe Acrobat MS Word MS Excel XSL Editors
XSL
XML/BI Publisher
XML/BI Publisher
For this we can add XML publisher responsibility to user. Then switch to that responsibility. Then go through the following navigation for defining Data definition HOME --> Datadefinitions Then it displays form like below
XML/BI Publisher
In the above form we have to give code as Concurrent Program short name", which we already defined.
XML/BI Publisher
Defining Template
After defining Datadefinitions now we have to define Template For this navigation is XML publisher Responsibility --> Home --> Templates Form will look like as below
XML/BI Publisher In template form also we have to give code as Concurrent Program short name Type is RTF Give appropriate Application name Attach .rtf file which we created
Submitting Request
XML/BI Publisher
XML/BI Publisher
View Output
Concurrent Program is completed normal. Then we can see output by clicking on view output button.
You can change the name of the XML tag here initially creation_date column XML tag is creation_date
Here we can see the changed XML tag name of creation_date column as DATE
Here we can see the changed xml tag name of creation_date as Date
As the name indicates, it will exclude that item from the XML tag.
Create a Stored Procedure Define Executable Define concurrent Program Add Concurrent Program to Receivables request group Create data definition Create Template Run the Concurrent Program to see the output
XML/BI Publisher
Stored Procedure:
create or replace PROCEDURE oe_xml ( errbuff OUT VARCHAR, retcode OUT NUMBER) AS CURSOR header_select IS SELECT ooh.order_number , oet.name , hzp.party_name FROM oe_order_headers_all ooh, oe_transaction_types_tl oet , hz_parties hzp , hz_cust_accounts hca WHERE 1 =1 AND ooh.order_type_id =oet.transaction_type_id AND ooh.sold_to_org_id=hca.cust_account_id AND hzp.party_id =hca.party_id AND ooh.order_number = '43009'; CURSOR line_select(o_num VARCHAR2) IS SELECT ool.line_number, msi.segment1 , msi.description , ool.ordered_quantity , ool.unit_selling_price FROM oe_order_lines_all ool, oe_order_headers_all ooh , mtl_system_items_b msi WHERE 1 =1 AND ool.header_id =ooh.header_id AND ool.inventory_item_id= msi.inventory_item_id AND ool.ship_from_org_id = msi.organization_id AND ooh.order_number = o_num ; BEGIN FOR header_rec IN header_select LOOP FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<HEADER>'); FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' <ORDER_NUMBER> ' || header_rec.order_number||' </ORDER_NUMBER>'); FOR line_rec IN line_select(header_rec.order_number) LOOP FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' <LINE>'); FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' <LINE_NUMBER>' ||line_rec.line_number ||'</LINE_NUMBER>' ); FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' <ITEM>' ||line_rec.segment1 ||'</ITEM>' ); FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' <DESCRIPTION>' ||line_rec.description ||'</DESCRIPTION>' ); FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' <ORDERED_QUANTITY>' ||line_rec.ordered_quantity ||'</ORDERED_QUANTITY>' ); FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' <UNIT_PRICE>' ||line_rec.unit_selling_price ||'</UNIT_PRICE>' ); FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' </LINE>'); END LOOP; FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</HEADER>'); END LOOP; END oe_xml;
Create an executable SampleXmlReport for the above procedure oe_xml Give Execution Method as PLSQL Stored Procedure Give Stored procedure name as Executable File Name Navigation is: System administratorProgramExecutable
XML/BI Publisher Define concurrent Program: Create a new concurrent program SampleXmlReport that will call the
SampleXmlReport executable declared above. Make sure that output format is placed as XML. Go to Application Developer Responsibility -> Concurrent ->Program
Add this new concurrent program with Receivables request group. Either using the following code or through below application screen. Go to System Administrator Responsibility->Security->Responsibility->Request
From the receivables responsibility (depends on which responsibility we added our concurrent program here it is receivables) From the menu View->Requests->Submit A New Request->Single Request
XML/BI Publisher
Click on the required format in Preview tab to see the output Then create data definitions and data template as follows
Click on Apply
Then Click on apply Run the Concurrent Program to get the output.
XML/BI Publisher 3.Through XML Tags: Steps to be followed when dealing with Stored Procedure:
Design the Data Template XML File. Create data definition Define concurrent Program to generate the Data XML File. Add Concurrent Program to required module request group Create Template Add Template to data definition Run the Concurrent Program to see the output
XML/BI Publisher
Design the Data Template XML File. SQL Query to develop BI Publisher Report: The XML/BI publisher requires a template layout and data XML to generate the report PDF,EXCEL,RTF or HTML format. The data XML can be generated from Oracle Report,OA Framework and data Template. Using this approach you can develop BI Publisher reports in Oracle EBS,without having to develop an RDF report. You can specify an SQL Statement in an XML file, and result of that SQL Statement is published as XMLP Output.
XML/BI Publisher
The data template is the XML document whose elements communicate the following information to the data engine. Data Query : The SQL query with bind parameter specifying the data to be fetched. Bind Parameters : Definition of each bind parameter defined in the query. Data Structure : Definition of the Output XML Structure. Data Triggers : Triggers that should be executed before or after the data query execution. Triggers are used to either do initialization or do some post query operation.
XML/BI Publisher
Sample Data Template: Hence Data Template is the means by which we inform the data engine to fetch the data of our interest. Apart from the these , data template also contains other elements. To make our example simple and easy to understand, lets deal with the above 4 elements.
XML/BI Publisher
Data Template Structure:
XML/BI Publisher
Data Template Declaration:
Define Parameters:
XML/BI Publisher
Lexical References: You can use lexical references to replace the clauses appearing after SELECT, FROM, WHERE, GROUP BY, ORDER BY, or HAVING. Use a lexical reference when you want the parameter to replace multiple values at runtime. Create a lexical reference using the following syntax: ¶metername Define the lexical parameters as follows: Before creating your query, define a parameter in the PL/SQL default package for each lexical reference in the query. The data engine uses these values to replace the lexical parameters. Create your query containing lexical references.
XML/BI Publisher
For example:
Package employee AS where_clause varchar2(1000); ..... Package body employee AS ..... where_clause := 'where deptno=10'; ..... Data template definition: <dataQuery> <sqlstatement name="Q1"> <![CDATA[SELECT ENAME, SAL FROM EMP &where_clause]]> </sqlstatement> </dataQuery>
XML/BI Publisher
Data Query:
Use <sqlStatement name=""> to define query Performing operations in SQL is faster than performing them in Data Template or PL/SQL. The following are the most common cases where using SQL would improve performance: Use a WHERE clause instead of a group filter to exclude records. Perform calculations directly in your query rather than in template.
Example: Data Query <parameters> <parameter name="p_DeptNo" dataType="character" /> </parameters> <dataQuery> <sqlStatement name="Q1"> <![CDATA[ SELECT d.DEPTNO,d.DNAME,d.LOC, EMPNO,ENAME,JOB,MGR,HIREDATE,SAL from dept d, emp e where d.deptno=e.deptno AND d.deptno = nvl(:p_DeptNo,d.deptno) ]]> </sqlStatement> </dataQuery>
XML/BI Publisher
Data Triggers
Data triggers execute PL/SQL functions at specific times during the execution and generation of XML output. Data triggers are optional, and you can have as many <dataTrigger> elements as necessary. The <dataTrigger> element has a set of related attributes. These are expressed within the <dataTrigger> tag. . For example, the name and source attributes are expressed as follows: <dataTrigger name="beforeReport" source="employee.beforeReport()"/> <dataTrigger name="beforeReport" source="employee.beforeReport(:Parameter)"/> The location of the trigger indicate at what point the trigger fires:
XML/BI Publisher
The Data Structure Section:
In the data structure section you define what the XML output will be and how it will be structured. You can do the following: Create break groups: Order By in SQL query should be set Apply group filters: WHERE clause Should be use instead of a group filter Create summary columns: Sum, Average, Count, Maximum and Minimum Example: <group name="G_DEPT" source="Q1" groupFilter="empdata.G_DEPTFilter(:DEPT_NUMBER)"> <element name="DEPT_NUMBER" value="DEPTNO" /> <element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()"/> <group name="G_EMP" source="Q2"> <element name="EMPLOYEE_NUMBER" value="EMPNO" /> <element name="NAME" value="ENAME"/> <element name="JOB" value="JOB" /> <element name="SALARY" value="SAL"/> </group> </group>
XML/BI Publisher
Linking Queries:
Two ways of linking are supported Bind variables in your query Link element <link name="" ../> Performance Considerations As far as our test shows that use bind PL/SQL variable for detail query is more efficient to merge the two queries rather than build one single query out of that This might not apply to all cases.
Example: Using Link tag
<dataQuery> <sqlStatement name="Q1"> <![CDATA[ SELECT DEPTNO,DNAME,LOC from dept where &pwhereclause order by deptno ]]> </sqlStatement> <sqlStatement name="Q2"> <![CDATA[ SELECT EMPNO,ENAME,JOB,MGR,HIREDATE,SAL from EMP ]]> </sqlStatement> <link name="DEPTEMP_LINK" parentQuery="Q1" parentColumn="DEPTNO" childQuery="Q2" childColumn=DEPTNOcondition="="/> </dataQuery>
XML/BI Publisher
Defining Data definitions
For this we Should add XML publisher responsibility to user. Then switch to that responsibility. Then go through the following navigation for defining Data definition HOME --> Datadefinitions Then it displays form as below
XML/BI Publisher
In the above form we have to give code and use the same code as concurrent program short name.
After creating data definitions then click on Apply we will get the following options below of this form
XML/BI Publisher
XML Schema:
XML/BI Publisher
Define a Concurrent Program to generate the Data XML File. Using Responsibility System Administrator --> Concurrent : Program --> Define. Define a Concurrent Program With executable = XDODTEXE and Output Format = XML.
XML/BI Publisher
For each parameter in the Data Template, define a parameter in the concurrent program. The Data Template parameter name should match the concurrent program parameter token.
XML/BI Publisher
Associate the Concurrent Program to a request group.
XML/BI Publisher
Execute the concurrent program XML Publisher Invoice Program "and click on the output button get the Data XML. Save the XML file. We will use it to generate the RTF Template.
XML/BI Publisher
XML/BI Publisher
XML/BI Publisher
Load the XML data file to MS Word and save it as .rtf file
XML/BI Publisher
XML/BI Publisher
When we click on Insert-->Field button the following form will be displayed. Then we can insert fields into appropriate columns.
XML/BI Publisher
Standard Templates
desktop applications
Adobe Acrobat MS Word MS Excel XSL Editors
XSL
XML/BI Publisher
XML/BI Publisher
For this we can add XML publisher responsibility to user. Then switch to that responsibility. Then go through the following navigation for defining Data definition HOME --> Datadefinitions Then it displays form like below
XML/BI Publisher
In the above form we have to give code as Concurrent Program short name", which we already defined.
XML/BI Publisher
Defining Template
After defining Datadefinitions now we have to define Template For this navigation is XML publisher Responsibility --> Home --> Templates Form will look like as below
XML/BI Publisher In template form also we have to give code as Concurrent Program short name Type is RTF Give appropriate Application name Default file name is .rtf file name which we already defined.
Submitting Request
XML/BI Publisher
XML/BI Publisher
View Output
Concurrent Program is completed normal. Then we can see output by clicking on view output button.
XML/BI Publisher
XML/BI Publisher
picture 1: xdo-pdf-security
picture 2: xdo-pdf-open-password
XML/BI Publisher
The XML Publisher properties need to have xdo- as a prefix to their regular names so pdf-open-password becomes xdo-pdf-open-password. Just add the XML Publisher properties and their value to the document using the dialog.
Once this is done , opening the PDF will prompt you for a password
XML/BI Publisher
Multilayout
Steps for handling multiple layouts in XML. 1. After developing the Report definition file (.rdf). 2. we have to add one user parameter. 3. This parameter value should be assigned to Place holder column(CP ). 4. We can assign Parameter value either after parameter form or before report Triggers. In this example we assigned in Before report trigger.
Develop a Data model, Then save that file name with .rdf extension
1. After developing the Report definition file (.rdf) we have to add one more parameter like follows and give data type as Character.
XML/BI Publisher
GETTING TWO KIND OF OUTPUTs AT A TIME(Multi Template)
The Unique feature of XML Report is to get two kind of reports at a time. For this, we have to do a minor Modification. Here, Let us imagine that there is a situation to get both the templates at a time. [Manager1 is asking a report in PDF format and Manager2 is asking a report in Excel format].
Create a Report using a Query in .rdf format. STEP1: Open the Report Builder and Select the option to build the report manually. The Query used is to bring the items created after 01-Jan-2011 SELECT inventory_item_id, segment1, description, creation_date FROM mtl_system_items_b WHERE creation_date > TO_DATE ('01-JAN-2011') AND organization_id = 204 Create the Layout. [Actually, there is no need to create layout for XML report.]
XML/BI Publisher
Create a report and register it as Concurrent Program of type XML Build a Data Definition & XML Template using XML Publisher Create a relation between the XML Template & Concurrent Program
XML/BI Publisher
Registration
First develop a report data model based on requirement. Then save the file name with extension '.rdf'. Then move that file into server in appropriate top. Make executable file and method as oracle reports and define concurrent program of type xml.
XML/BI Publisher
Add Concurrent program to appropriate responsibility. Then go to that responsibility and submit a request through SRS WINDOW Run the concurrent program
XML/BI Publisher
XML/BI Publisher
XML/BI Publisher
XML/BI Publisher
Load the XML data file to MS Word and save it as .rtf file
XML/BI Publisher
Use Table wizard to design the template.
XML/BI Publisher
XML/BI Publisher
XML/BI Publisher
Save the layout template with .rtf extension
XML/BI Publisher
Click on preview tab to see the output in different formats
XML/BI Publisher
For this we can add XML publisher responsibility to user. Then switch to that responsibility. Then go through the following navigation for defining Data definition HOME --> Datadefinitions Then it displays form as below
XML/BI Publisher
In the above form we have to give code as Concurrent Program short name", which we already defined.
XML/BI Publisher
Defining Template
After defining Datadefinitions now we have to define Template For this navigation is XML publisher Responsibility --> Home --> Templates Form will look like below
XML/BI Publisher
In template form also we have to give code as Concurrent Program short name Type is RTF Give appropriate Application name Attach .rtf file which we created
Submitting Request
XML/BI Publisher
XML/BI Publisher
View Output
Concurrent Program is completed normal. Then we can see output by clicking on view output button.
XML/BI Publisher
Design another rtf template as follows
XML/BI Publisher
Here we can observe that for one data definition we have created two templates
XML/BI Publisher
You can see that the Old template was added here. If, You need to change this one click on options
XML/BI Publisher
Add the new template as below If we want to change the output format then click on format and select the desired format
XML/BI Publisher
Here we can see the changed format that is HTML and click on ok Here we can see two attached layout templates then click on submit
XML/BI Publisher
Here we can see that two templates will run simultaneously and we will get the output based on the format we specified while adding the templates to the concurrent program
After running the concurrent program successfully we can see the following outputs by clicking on view output
XML/BI Publisher
First template HTML output Second template PDF output
XML/BI Publisher
Regrouping
If You want to use Grouping by Currency Code ,Supplier name, country code etc..inside the existing group, You can add this. Syntax: To regroup the data, use the following syntax: <?for-each-group: BASE-GROUP;GROUPING-ELEMENT?> Example: If we regroup the G_INVOICE_NUM listing by currency_code in the template it will be as follows
XML/BI Publisher
Layout Template for regrouping Regrouping with currency code output
XML/BI Publisher
Nested Grouping:
To establish nested groupings within the already defined group, use the following syntax: <?for-each:current-group(); GROUPING-ELEMENT?> Example: <?for-each:current-group(); GL_DATE?>
XML/BI Publisher
Regrouping by an Expression Regrouping by an expression allows you to apply a function or command to a data element, and then group the data by the returned result. To use this feature, state the expression within the regrouping syntax as follows:
<?for-each:BASE-GROUP;GROUPING-EXPRESSION?>
XML/BI Publisher
What is Bursting?
XML Publishers bursting engine accepts a data stream and splits it based on multiple Criteria, generates output based on a template, and then delivers the individual documents through the delivery channel of choice. The engine provides a flexible range of possibilities for document generation and delivery. oracle Bursting Mechanism enables us to deliver a single XML Publisher report/letter to multiple destinations simultaneously.One can create a single report/letter , then send it in any format (e.g., PDF or HTML) to multiple destinations(email ids).
XML/BI Publisher
The feature is standard for XML Publisher version 5.6.3 No coding is required Output is sent via email. User does not need to login to Oracle to get the report The main report template and the bursting templates can be different from each other. Thus there can be one output from the concurrent program and a different layout to send as email. Example for Data Template:
<?xml version="1.0"?> <dataTemplate name="UserDT" description="User Details" version="1.0"> <parameters> <parameter name="p_createdby" dataType="Varchar2"/> </parameters> <dataQuery> <sqlStatement name="Q1"> <![CDATA[SELECT user_id,user_name,created_by from fnd_user where user_id=nvl(:p_createdby,user_id)]]> </sqlStatement> <dataStructure> <group name="G_User" source="Q1"> <element name="user_id" value="user_id"/> <element name="User_NAME" value="user_name"/> <element name="created_by" value="created_by"/> </group> </dataStructure> </dataTemplate>
XML/BI Publisher
Create Concurrent Program Defining Parameters
XML/BI Publisher
Register the data definition:
Navigation is:XML Publisher Administrator Data Definition
Attach the concurrent program to the request group and execute the program to generate the XML output.
XML/BI Publisher
XML/BI Publisher
Please find attached your invoice <B> #${TRX_NUMBER} </B> .... .... .... Regards Account Receivables Manager </xapi:message> </xapi:email> </xapi:delivery> <xapi:document key="${TRX_NUMBER}" output="${TRX_NUMBER}" outputtype="pdf" delivery="Myemail"> <xapi:template type="rtf" locale="" location="xdo://AR.RAXINV.en.US/?getSource=true" translation="" filter=""> </xapi:template> </xapi:document> </xapi:request> </xapi:requestset>
XML/BI Publisher
Fax control file
<?xml version="1.0" encoding="UTF-8"?> <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" listener="oracle.apps.xdo.batch.SampleListener"> <xapi:request select="/RAXINV/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE"> <xapi:delivery> <xapi:fax server="faxprintername"> <xapi:number id="MyFax">fax number</xapi:number> </xapi:fax> </xapi:delivery> <xapi:document key="${TRX_NUMBER}" output="${TRX_NUMBER}" output-type="pdf" delivery="MyFax"> <xapi:template type="rtf" locale="" location="xdo://AR.RAXINV.en.US/?getSource=true" translation="" filter=""> </xapi:template> </xapi:document> </xapi:request> </xapi:requestset>
XML/BI Publisher
Printer control file:
<?xml version="1.0" encoding="UTF-8"?> <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" listener="oracle.apps.xdo.batch.SampleListener"> <xapi:request select="/RAXINV/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOIC E"> <xapi:delivery> <xapi:print id="Myprinter"printer="Printer Name" copies="1" /> </xapi:delivery> <xapi:document key="${TRX_NUMBER}" output="${TRX_NUMBER}" outputtype="pdf" delivery="Myprinter"> <xapi:template type="rtf" locale="" location="xdo://AR.RAXINV.en.US/?getSource=true" translation="" filter=""> </xapi:template> </xapi:document> </xapi:request> </xapi:requestset>
XML/BI Publisher
FTP control file
<?xml version="1.0" encoding="UTF-8"?> <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" listener="oracle.apps.xdo.batch.SampleListener"> <xapi:request select="/RAXINV/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE"> <xapi:delivery> <xapi:ftp id="Myftp" server="ftp address" user="${ftp_user}" password="${ftp_password}" remote-directory="/output" remote-file="${${TRX_NUMBER}.pdf"> </xapi:ftp> </xapi:delivery> <xapi:document key="${TRX_NUMBER}" output="${TRX_NUMBER}" output-type="pdf" delivery="Myftp"> <xapi:template type="rtf" locale="" location="xdo://AR.RAXINV.en.US/?getSource=true" translation="" filter=""> </xapi:template> </xapi:document> </xapi:request> </xapi:requestset>
XML/BI Publisher
Conclusion
Oracle XML Publisher offers you the most efficient, scalable reporting solution available for complex, distributed environments. Oracle XML Publisher reduces the high costs associated with the development, customization and maintenance of business documents.
Thank You