XML Publisher Int Questions
XML Publisher Int Questions
XML Publisher Int Questions
In Oracle Reports, a single executable RDF file contains the data source, layout, business
logic, and the language-specific prompts. However, BI Publisher separates these
components into different layers. Following are some of the key limitations of Oracle
Reports that are overcome by BI Publisher:
Multiple layouts If you wish to publish the data from a report in more than one format—for
example, in both an Excel and HTML layout—then multiple RDF files have to be prepared. If
any bug fixes are required, fixes will have to be applied to both RDF files.
Multiple language Global implementations for a large organization usually require the
same report to be developed in multiple languages. In case of Oracle Reports, developers
will have to create different copies of the same RDF files and place them in the <application
top>/reports/<language> directory. In case of any bug fixes to data or any changes to
layout, all the copies of reports have to be amended.
Trivial tasks Even trivial tasks like changing the prompt or minor changes to the layout
require a developer in Oracle Reports. Using BI Publisher, these tasks can be implemented
by trained support staff or business analysts.
Distribution The distribution capabilities in the Oracle Reports tool within E-Business
Suite are very restrictive. To distribute the output of Oracle Reports, many companies
implementing E-Business Suite have to purchase third-party products or even build their
own in-house reports distribution framework. With BI Publisher, a mechanism
named bursting can automate distribution of the reports using industry standard delivery
protocols.
Securing the output When distributing the output of Oracle Reports in E-Business Suite,
it is not possible to secure the output using a password. BI Publisher facilitates password
protection of the documents.
Due to the previously listed limitations, the cost of customization and maintenance is very
high for Oracle Reports in Multilanguage implementations. In the case of BI Publisher, the
data layer, presentation layer, and the translation layer are separate. Additionally, BI
Publisher is based on open standards and thus overcomes many of the limitations of Oracle
Reports. In addressing some of the limitations of Oracle Reports and adopting open
standards, Oracle has allowed implementations to potentially reduce the overall cost of
build, customization, and ongoing maintenance of reports.
1. What is a data template in BI publisher?
Data template is an xml structure which have the queries to be run for a database so that output
can be generated in xml format,
this generated xml output is further applied on a layout template for the final required output.
Ans: The various sections in the data template in BI publisher are as:
Parameter section
Lexical Section
Trigger Section
SQL statement section
Data Structure section
5): In BIP, how do you display the company logo in the report output?
Ans: In BIP, you can just copy and paste the logo (.gif, .jpg or any format) on the
header section of .rtf file.
Resize the log per the company standards.
Answer: Layout template defines how the user views the output,
basically it can be developed using Microsoft word document in rft (rich text
format) or Adobe pdf format.
The data output in xml format (from Data template) will be loaded in layout
template at run time and the required final output file is generated.
FND_REQUEST.ADD_LAYOUT (
);
How to submit the XML/BI report from Back end?
FND_REQUEST.ADD_LAYOUT (
);
Answer:
PER_GB_XDO_TEMPLATES
XDO_DS_DEFINITIONS_B
XDO_DS_DEFINITIONS_TL
XDO_DS_DEFINITIONS_VL
XDO_LOBS
XDO_TEMPLATES_B
XDO_TEMPLATES_TL
XDO_TEMPLATES_VL
XDO_TEMPLATE_FIELDS
XDO_TRANS_UNITS
XDO_TRANS_UNIT_PROPS
XDO_TRANS_UNIT_VALUES
How to get SYSDATE in the header section dynamically when we run the
report?
Answer: You cannot insert form fields in the Header section, but you can just
insert the code to achieve this. For example: insert this in the header section to
view the sysdate: You could format the date as you would like.
<?xdofx: sysdate(‘YYYY-MM-DD’)?>
How to calculate the running total in XMLP?
Answer:
<?xdoxslt:set_variable($_XDOCTX, ‘RTotVar’,
xdoxslt:get_variable($_XDOCTX, ‘RTotVar’) + ACCTD_AMT(This is column
name) )?>
<?xdoxslt:get_variable($_XDOCTX, ‘RTotVar’)?>
ELSE
Y=3
END IF
You can also nest these statements as follows:
IF X=0 THEN
Y=2
ELSE
IF X=1 THEN
Y=10
ELSE Y=100
END IF
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?>
For example, the following statement tests the AMOUNT element value. If the value is greater
than 1000, show the word “Higher”; if it is less than 1000, show the word “Lower”; if it is equal
to 1000, show “Equal”:
<?xdofx:if AMOUNT > 1000 then 'Higher'
if AMOUNT < 1000 then 'Lower'
Else
'Equal'
end if?>
2) How to get SYSDATE in the header section dynamically when we run the
report
You cannot insert form fields in the Header section, but you can just insert the code to achieve
this. For example: insert this in the header section to view the sysdate: You could format the date
as you would like..
<?xdofx: sysdate(‘YYYY-MM-DD’)?>
url:{'http://www.oracle.com/images/ora_log.gif'}
url:{'${OA_MEDIA}/image name'}
To show the page total , add the below tag in the footer or Header
<?show-page-total: INVOICE_AMT_PT;’999G999D99’?>
Last Page:
Take the any one of the insert field type in the following syntax,
Suppose,
Field name : Last page body
Status bar: <?start@last-page-first:body?><?end body?>
This is last page
Page Break:
<?split-by-page-break:?>
Section Break:
<?for-each@section:G_CUSTOMER(This is group name)?>
Properties:
<?PASSWORD?>
In XML we have to write in,
<PASSWORD>welcome</PASSWORD>
Bar Code:
<?register-barcode-
vendor:'oracle.apps.xdo.template.rtf.util.barcoder.BarcodeUtil';'XMLPBarVend
or'?>
<?format-barcode:JOB;'code128a';'XMLPBarVendor'?>
Conditional Formating:
<?if:ACCTD_AMT(This is column name)<1000?><xsl:attribute
xdofo:ctx="block" or “incontext” name="font-weight">bold</xsl:attribute><?end
if?>
Incontext means: column level
Block means: row level
Multi Layout:
<?choose:?>
<?when:CF_CHOICE=’VENDOR’?>
<?end when?>
<?when:CF_CHOICE=’INVOICE’?>
<?end when?>
<?when:CF_CHOICE=’PO’?>
<?end when?>
<?end choose?>
Running Total:
<?xdoxslt:set_variable($_XDOCTX, 'RTotVar',
xdoxslt:get_variable($_XDOCTX, 'RTotVar') + ACCTD_AMT(This is
column name) )?><?xdoxslt:get_variable($_XDOCTX, 'RTotVar')?>
<xdofo:inline-total display-condition="exceptlast"
name="InvAmt"><xdofo:show-carry-forward name="InvAmt"
format="99G999G999D00" number-separators=",."/></xdofo:inline-
total>
Carried Forward:
<xdofo:inline-total display-condition="exceptfirst"
name="InvAmt"><xdofo:show-brought-forward name="InvAmt"
format="99G999G999D00" number-separators=",."/></xdofo:inline-
total>
Page Total:
<?add-page-total:’INV_AMT’;’INVOICE_AMT_PT’?>
<?show-page-total: INVOICE_AMT_PT;’999G999D99’?>
Repeating Headre:
For loop
<?for-each:G_CUSTOMER?>
<?end for-each?>
WATERMARK
PAGE LAYOUTWATERMARK (Word 2007)
Format Background Printed Watermark (Word 2003)
TEXT FIELD
Developercontrolslegacy toolstext field
CONDITIONAL FORMATTING
The XSL code you need is:
<?if:TRANS_AMOUNT_REMAINING >1000?>
<xsl:attribute xdofo:ctx="block" name="background-color">red</xsl:attribute>
<?end if?>
BARCODE
Select File Properties Custom Tab
In the Name field enter: xdo-font.Free 3 of 9.normal.normal – notice the name of the font must
match the name of the font in the MSWord font drop down
In the Value field enter: truetype.c:\windows\fonts \FREE3OF9.ttf
SORTING:
<?sort:TRANS_AMOUNT;'ascending';data-type='text'?>
DIFFERENT LAST PAGE:To utilize this feature, you must create a section break in your template
to ensure the content of the final page is separated from the rest of the report and Insert the following
syntax on the final page:
<?start@last-page:body?>
<?end body?>
What is Bursting in XML Publisher?
Lets say we have information of 100 different Customer Invoices in a single report. In case of bursting,
XMLP engine upon a predefined criteria (Bursting criteria), helps generates single output file for each
customer invoice i.e. 100 report files for 100 Customer Invoices and emails each report output file
individually. We can even fax the output.
Bursting Criteria is nothing but a grouping criteria upon which report output gets splitted.
How to use Variables in XMLP
Declaring the Variable R and Assigning the Values 4 to R
<?xdoxslt:set_variable($_XDOCTX, ‘R’, 4)?>
Setting the Password for PDF File sent through XML Publisher
Open the rtf for which you want to set password and do the following things
1) Open the .rtf
2) Go to File – > Properties
Create a new custom property
a) Name :xdo-pdf-security
Type : text
Value :true
b) Name : xdo-pdf-open-password
Type : text
Value : password
<PASSWORD>welcome</PASSWORD>
If You Want to Hide a Field: