1.) Define
Header some where in the page as per requirement. (call header )
<?Call:header?>
<?Call:header?>
<?template:
header?>
<?end template?>
<?end template?>
——————————
2) For body
Contents
<?start:body?>
<?end body?>
<?start:body?>
<?end body?>
——————————
3)Last Page
Only Content:
Insert the following syntax on the final page:
<?start@last-page:body?>
<?end body?>
Insert the following syntax on the final page:
<?start@last-page:body?>
<?end body?>
——————————
4) Sort
(Data sorting)
<?sort:trx_number?>
<?sort:trx_number?>
Sort
descending
<?sort:trx_number;data-type=‘number’;order=‘descending’?>
<?sort:trx_number;data-type=‘number’;order=‘descending’?>
multiple sort
tags
<?sort:trx_number?><?sort:trx_date?&g
—————————–
<?sort:trx_number?><?sort:trx_date?&g
—————————–
Oracle Number
Format Mask
<?format-number:fieldname;’999G999D99’?>
——————————
Mask Output
for US Locale
– SHORT =2/31/99
– MEDIUM =Dec 31, 1999
– LONG =Friday, December 31, 1999
– SHORT_TIME =12/31/99 6:15 PM
– MEDIUM_TIME =Dec 31, 1999 6:15 PM
– LONG_TIME =Friday, December 31, 1999 6:15 PM
– SHORT_TIME_TZ =12/31/99 6:15 PM GMT
– MEDIUM_TIME_TZ =Dec 31, 1999 6:15 PM GMT
– LONG_TIME_TZ =Friday, December 31, 1999 6:15 PM GMT
– SHORT =2/31/99
– MEDIUM =Dec 31, 1999
– LONG =Friday, December 31, 1999
– SHORT_TIME =12/31/99 6:15 PM
– MEDIUM_TIME =Dec 31, 1999 6:15 PM
– LONG_TIME =Friday, December 31, 1999 6:15 PM
– SHORT_TIME_TZ =12/31/99 6:15 PM GMT
– MEDIUM_TIME_TZ =Dec 31, 1999 6:15 PM GMT
– LONG_TIME_TZ =Friday, December 31, 1999 6:15 PM GMT
4) Page
Breaks:
<?split-by-page-break:?>
<?split-by-page-break:?>
——————————
5)Arthemitical
Calculated Fields:
<?field1 + field2?>
<?field1 – field2?>
<?field1 * field2?>
<?field1 / field2?>
<?field1 + field2?>
<?field1 – field2?>
<?field1 * field2?>
<?field1 / field2?>
——————————
6) Dynamic
data columns:
Dynamic Column Header
<?split-column-header:group element name?>
Dynamic Column Header
<?split-column-header:group element name?>
Dynamic
Column Data
<?split-column-data: group element name?>
<?split-column-data: group element name?>
——————————
7)Rows per
page:
Define row counter variable in a form field
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, 0)?>
Define row counter variable in a form field
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, 0)?>
Increment
counter for each line (again in a form field)
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, xdoxslt:
get_variable($_XDOCTX, ’Counter’) + 1)?>
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, xdoxslt:
get_variable($_XDOCTX, ’Counter’) + 1)?>
Break if the
number of rows is reached (say 6 rows in this example)
<?if: xdoxslt:get_variable($_XDOCTX, ’Counter’) mod 6=0?>
<?split-by-page-break:?>
<?end if?
<?if: xdoxslt:get_variable($_XDOCTX, ’Counter’) mod 6=0?>
<?split-by-page-break:?>
<?end if?
——————————
8)Re-grouping
XML Data:
Not limited by the structure of the data source
Use the tags
<?for-each-group: BASE-GROUP;GROUPING-ELEMENT?>
<?end for-each-group?>
Not limited by the structure of the data source
Use the tags
<?for-each-group: BASE-GROUP;GROUPING-ELEMENT?>
<?end for-each-group?>
Can establish
nested groupings
<?for-each:current-group(); GROUPING-ELEMENT?>
<?end for-each-group?>
<?for-each:current-group(); GROUPING-ELEMENT?>
<?end for-each-group?>
——————————
9)Conditional
Cell Highlighting
Allows to conditionally highlight individual cells, columns, or rows in final output.
Allows to conditionally highlight individual cells, columns, or rows in final output.
<?if:XML_ELEMENT>Value?>
<xsl:attribute xdofo:ctx=”block” name=”background-color”>COLOR
</xsl:attribute>
<?end-if?>
<xsl:attribute xdofo:ctx=”block” name=”background-color”>COLOR
</xsl:attribute>
<?end-if?>
——————————
10)Page
totals:
Declare variable to hold page totals, following data element declaration
<?add-page-total:TotalFieldName;’element’?>
Declare variable to hold page totals, following data element declaration
<?add-page-total:TotalFieldName;’element’?>
Display total
field
<?show-page-total:TotalFieldName;’Oracle-number-format’?>
<?show-page-total:TotalFieldName;’Oracle-number-format’?>
——————————
11) If
no data found message in a report
<?if:CS_CNT_ORD =0?>*************NO DATA FOUND*************<?end if?>
<?if:CS_CNT_ORD =0?>*************NO DATA FOUND*************<?end if?>
——————————
12) SQL Functions
12) SQL Functions
lpad function
<?xdofx:lpad(‘aaa’,10,’.’)?>
<?xdofx:lpad(‘aaa’,10,’.’)?>
——————————
Concatenation
Function
<?xdofx:3||2?>
<?xdofx:3||2?>
——————————
rpad function
<?xdofx:rpad(‘aaa’,10,’.’)?>
<?xdofx:rpad(‘aaa’,10,’.’)?>
trim function
<?xdoxslt:trim(‘ a ‘)?>
<?xdoxslt:trim(‘ a ‘)?>
ltrim
function
<?xdoxslt:ltrim(‘ a ‘)?>
<?xdoxslt:ltrim(‘ a ‘)?>
rtrim
function
<?xdoxslt:rtrim(‘ a ‘)?>
<?xdoxslt:rtrim(‘ a ‘)?>
decode
function
<?xdofx:decode(‘xxx’,’bbb’,’ccc’,’xxx’,’ddd’)?>
Instr function
<?xdofx:Instr(‘abcabcabc’,’a’,2)?>
<?xdofx:decode(‘xxx’,’bbb’,’ccc’,’xxx’,’ddd’)?>
Instr function
<?xdofx:Instr(‘abcabcabc’,’a’,2)?>
substr
function
<?xdofx:substr(‘abcdefg’,2,3)?>
<?xdofx:substr(‘abcdefg’,2,3)?>
left function
<?xdoxslt:left(‘abcdefg’, 3)?>
<?xdoxslt:left(‘abcdefg’, 3)?>
right
function
<?xdoxslt:right(‘abcdefg’, 3)?>
<?xdoxslt:right(‘abcdefg’, 3)?>
replace
function
<?xdofx:replace(name,’John’,’Jon’)?>
<?xdofx:replace(name,’John’,’Jon’)?>
to_number
function
<?xdofx:to_number(‘12345’)?>
<?xdofx:to_number(‘12345’)?>
sysdate
function
<?xdofx:sysdate()?>
<?xdofx:sysdate()?>
<?xdofx:sysdate(‘dd-mon-yyyy’)?>
<?xdofx:sysdate(‘dd-mm-yyyy’)?>
<?xdofx:sysdate(‘day-dd-month-yyyy’)?>
lower
<?xdofx:lower (char)?>
<?xdofx:lower (char)?>
upper
<?xdofx:upper(char)?>
<?xdofx:upper(char)?>
length
<?xdofx:length(char)?>
<?xdofx:length(char)?>
——————————
Returns the
minimum value of the element in the set
<?xdoxslt:minimum(ELEMENT_NAME)?>
<?xdoxslt:minimum(ELEMENT_NAME)?>
Returns the
maximum value of the element in the set.
<?xdoxslt:maximum(ELEMENT_NAME)?>
<?xdoxslt:maximum(ELEMENT_NAME)?>
——————————
Copy the
Current Node
Use this element to create a copy of the current node.
XSL Syntax: <xsl:copy-of select=”name”>
BI Publisher Tag: <?copy-of:name?>
Use this element to create a copy of the current node.
XSL Syntax: <xsl:copy-of select=”name”>
BI Publisher Tag: <?copy-of:name?>
——————————
xxx) Call
Template
XSL Syntax: <xsl:call-template name=”name”>
BI Publisher Tag: <?call-template:name?>
xxx-1) Call Template – Template Declaration
XSL Syntax: <xsl:template name=”name”>
BI Publisher Tag: <?template:name?>
XSL Syntax: <xsl:call-template name=”name”>
BI Publisher Tag: <?call-template:name?>
xxx-1) Call Template – Template Declaration
XSL Syntax: <xsl:template name=”name”>
BI Publisher Tag: <?template:name?>
——————————
Import
Stylesheet
XSL Syntax: <xsl:import href=”url”>
BI Publisher Tag: <?import:url?>
XSL Syntax: <xsl:import href=”url”>
BI Publisher Tag: <?import:url?>
——————————–
Variables
Declaration and Assigning Value
<?xdoxslt:set_variable($_XDOCTX,‘variable name’, 0)?>
Declaration and Assigning Value
<?xdoxslt:set_variable($_XDOCTX,‘variable name’, 0)?>
Variables -1
Sets the value of variable_name to the current value plus the element amount
xdoxslt:set_variable($_XDOCTX,‘variable name’, xdoxslt:get_variable($_XDOCTX,‘variable name’)+element name)
Sets the value of variable_name to the current value plus the element amount
xdoxslt:set_variable($_XDOCTX,‘variable name’, xdoxslt:get_variable($_XDOCTX,‘variable name’)+element name)
Variables -2
Get Value
<?xdoxslt:get_variable($_XDOCTX, ‘variable name’)?>
Get Value
<?xdoxslt:get_variable($_XDOCTX, ‘variable name’)?>
Oracle Number
Format Mask
<?format-number:fieldname;’999G999D99’?>
——————————
<?format-date:fieldname;’MASK’?>
Mask Output for US Locale
– SHORT =2/31/99
– MEDIUM =Dec 31, 1999
– LONG =Friday, December 31, 1999
– SHORT_TIME =12/31/99 6:15 PM
– MEDIUM_TIME =Dec 31, 1999 6:15 PM
– LONG_TIME =Friday, December 31, 1999 6:15 PM
– SHORT_TIME_TZ =12/31/99 6:15 PM GMT
– MEDIUM_TIME_TZ =Dec 31, 1999 6:15 PM GMT
– LONG_TIME_TZ =Friday, December 31, 1999 6:15 PM GMT
<?format-number:fieldname;’999G999D99’?>
——————————
<?format-date:fieldname;’MASK’?>
Mask Output for US Locale
– SHORT =2/31/99
– MEDIUM =Dec 31, 1999
– LONG =Friday, December 31, 1999
– SHORT_TIME =12/31/99 6:15 PM
– MEDIUM_TIME =Dec 31, 1999 6:15 PM
– LONG_TIME =Friday, December 31, 1999 6:15 PM
– SHORT_TIME_TZ =12/31/99 6:15 PM GMT
– MEDIUM_TIME_TZ =Dec 31, 1999 6:15 PM GMT
– LONG_TIME_TZ =Friday, December 31, 1999 6:15 PM GMT
—————————–
for-each loop
<?for-each:XML group element tag name?>
<?end for-each?>
for-each loop
<?for-each:XML group element tag name?>
<?end for-each?>
———————
IF Stament
– <?if:boolean_test?>
<?end if?>
<?if:LINE_TYPE=’LINE’ ?>
<?end if?>
IF Stament
– <?if:boolean_test?>
<?end if?>
<?if:LINE_TYPE=’LINE’ ?>
<?end if?>
——————————
Rows per page
(Examples 6 rows per pages)
Define row
counter variable in a form field
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, 0)?>
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, 0)?>
Increment
counter for each line (again in a form field)
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, xdoxslt:
get_variable($_XDOCTX, ’Counter’) + 1)?>
<?xdoxslt:set_variable($_XDOCTX, ’Counter’, xdoxslt:
get_variable($_XDOCTX, ’Counter’) + 1)?>
Break if the
number of rows is reached (say 6 rows in this example)
<?if: xdoxslt:get_variable($_XDOCTX, ’Counter’) mod 6=0?>
<?split-by-page-break:?>
<?end if?
<?if: xdoxslt:get_variable($_XDOCTX, ’Counter’) mod 6=0?>
<?split-by-page-break:?>
<?end if?
——–****************************************
xdo user
guied xml tags
Defining
Groups?
<?for-each:XML group element tag name?>
<?end for-each?>
<?for-each:XML group element tag name?>
<?end for-each?>
Defining body
area?
Use the following tags to enclose the body area of your report:
<?start:body?>
<?end body?>
Use the following tags to enclose the body area of your report:
<?start:body?>
<?end body?>
Images ?
url:{IMAGE_LOCATION}
url:{IMAGE_LOCATION}
To change a
shape’s size along the x or y axis, use:
<?shape-size-x:RATIO?>
<?shape-size-y:RATIO?>
<?shape-size-x:RATIO?>
<?shape-size-y:RATIO?>
To insert
Page Break?
Page Breaks
<?split-by-page-break:?>
Page Breaks
<?split-by-page-break:?>
To insert
Initial Page number in different page?
Initial Page Number
<?initial-page-number:pagenumber?>
Initial Page Number
<?initial-page-number:pagenumber?>
To display
contents in last page?
Last Page Only Content
<?start@last-page:body?>
<?end body?>
Last Page Only Content
<?start@last-page:body?>
<?end body?>
End on Even
or End on Odd Page
<?section:force-page-count;’end-on-even-layout’?>
To end on an even page with layout
<?section:force-page-count;’end-on-even-layout’?>
To end on an odd page layout:
<?section:force-page-count;’end-on-odd-layout’?>
<?section:force-page-count;’end-on-even-layout’?>
To end on an even page with layout
<?section:force-page-count;’end-on-even-layout’?>
To end on an odd page layout:
<?section:force-page-count;’end-on-odd-layout’?>
Generating
Bookmarks in PDF Output
<?copy-to-bookmark:?>
directly above your table of contents and
<?end copy-to-bookmark:?>
<?copy-to-bookmark:?>
directly above your table of contents and
<?end copy-to-bookmark:?>
Check Boxes
implimention XDOUserGuide page no – 172.
Drop Down
Lists
Conditional
Formatting
<?if:VENDOR_NAME=’COMPANY
A’?>
<?end if?>
<?end if?>
If-then-Else
Statements XDOUserGuide page no – 178.
Choose
Statements
<?choose:?>
<?when:expression?>
<?otherwise?>
<?when:expression?>
<?otherwise?>
Column
Formatting XDOUserGuide page no – 180.
Row
Formatting XDOUserGuide page no – 183.
Conditionally Displaying a Row
Conditionally Highlighting a Row
Conditionally Displaying a Row
Conditionally Highlighting a Row
Cell
Highlighting
Displaying
Page Totals
<?add-page-total:TotalFieldName;’element’?>
<?show-page-total:TotalFieldName;’Oracle-number-format’?>
EG Oracle format mask (for example: C9G999D00)
<?add-page-total:TotalFieldName;’element’?>
<?show-page-total:TotalFieldName;’Oracle-number-format’?>
EG Oracle format mask (for example: C9G999D00)
Brought Forward/Carried
Forward Totals XDOUserGuide page no – 191
<xdofo:inline-total
display-condition=”exceptfirst” <!–>
name=”InvAmt”>
Brought Forward: <!–>
<xdofo:show-brought-forward <!–>
name=”InvAmt”
format=”99G999G999D00″/>
</xdofo:inline-total>
display-condition=”exceptfirst” <!–>
name=”InvAmt”>
Brought Forward: <!–>
<xdofo:show-brought-forward <!–>
name=”InvAmt”
format=”99G999G999D00″/>
</xdofo:inline-total>
<xdofo:inline-total
display-condition=”exceptlast” <!–>
name=”InvAmt”>
Carried Forward: <!–>
<xdofo:show-carry-forward <!–>
name=”InvAmt”
format=”99G999G999D00″/>
</xdofo:inline-total>
display-condition=”exceptlast” <!–>
name=”InvAmt”>
Carried Forward: <!–>
<xdofo:show-carry-forward <!–>
name=”InvAmt”
format=”99G999G999D00″/>
</xdofo:inline-total>
Running
Totals
————–
Declares the “RTotVar”
variable and initializes it to 0.
————–
Declares the “RTotVar”
variable and initializes it to 0.
<?xdoxslt:set_variable($_XDOCTX,
‘RTotVar’, 0)?>
Sets the
value of RTotalVar to the current value plus the new Invoice Amount.
Retrieves the
RTotalVar value for display.
<?xdoxslt:set_variable($_XDOCTX,
‘xml_tag’, xdoxslt:get_variable($_XDOCTX, ‘RTotVar’) +
xml_tag)?><?xdoxslt:get_variable($_XDOCTX, ‘RTotVar’)?>
Data Handling
Sorting
———-
<?sort:xml_tag?>
Sorting
———-
<?sort:xml_tag?>
<?sort:xml_tag1?>
<?sort:xml_tag2?><?sort:xml_tag2?>
Regrouping
———-
To regroup the data, use the following syntax:
<?for-each-group: BASE-GROUP;GROUPING-ELEMENT?>
———-
To regroup the data, use the following syntax:
<?for-each-group: BASE-GROUP;GROUPING-ELEMENT?>
Regrouping by
an Expression
To establish
nested groupings within the already defined group, use the following
<?for-each:current-group();
GROUPING-ELEMENT?>
Using
Variables
—————
—————
Use the
following syntax to declare/set a variable value:
<?xdoxslt:set_variable($_XDOCTX, ‘variable name’, value)?>
<?xdoxslt:set_variable($_XDOCTX, ‘variable name’, value)?>
Use the
following syntax to retrieve a variable value:
<?xdoxslt:get_variable($_XDOCTX, ‘variable name’)?>
<?xdoxslt:get_variable($_XDOCTX, ‘variable name’)?>
You can use
this method to perform calculations.
<?xdoxslt:set_variable($_XDOCTX, ‘x’, xdoxslt:get_variable($_XDOCTX, ‘x’+1)?>
<?xdoxslt:set_variable($_XDOCTX, ‘x’, xdoxslt:get_variable($_XDOCTX, ‘x’+1)?>
Defining
Parameters
——————-
Declare the parameter in the template.
Use the following syntax to declare the parameter:
<?param@begin:parameter_name;parameter_value?>
——————-
Declare the parameter in the template.
Use the following syntax to declare the parameter:
<?param@begin:parameter_name;parameter_value?>
parameter_name
is the name of the parameter
parameter_value is the default value for the parameter (the parameter_value is optional)
parameter_value is the default value for the parameter (the parameter_value is optional)
Setting
Properties
Advanced
Report Layouts
<?for-each@section:group name?>
where group_name is the name of the element for which you want to begin a new
section.
where group_name is the name of the element for which you want to begin a new
section.
For example,
the for-each grouping statement for this example will be as follows:
<?for-each@section:G_INVOICE?>
The closing <?end for-each?> tag is not changed.
<?for-each@section:G_INVOICE?>
The closing <?end for-each?> tag is not changed.
Dynamic Data
Columns
——————–
• Dynamic Column Header
<?split-column-header:group element name?>
——————–
• Dynamic Column Header
<?split-column-header:group element name?>
• Dynamic
Column <?split-column-data:group element name?>
• Dynamic
Column Width
<?split-column-width:name?> or
<?split-column-width:@width?>
<?split-column-width:name?> or
<?split-column-width:@width?>
• Dynamic
Column Width’s unit value (in points) <?split-column-width-unit:
value?>
value?>
Defining
Columns to Repeat Across Pages
<?horizontal-break-table:number?>
<?horizontal-break-table:number?>
Number and
Formatting
Using the Oracle Format Mask for Number
<?format-number:fieldname;’999G999D99′?>
Using the Oracle Format Mask for Number
<?format-number:fieldname;’999G999D99′?>
Date
Formatting
Using the Oracle Format Mask for Date
<?format-date:date_string;’ABSTRACT_FORMAT_MASK’;’TIMEZONE’?>
or
<?format-date-and-calendar:date_string;
‘ABSTRACT_FORMAT_MASK’;’CALENDAR_NAME’;’TIMEZONE’?>
or
<?format-date:hiredate;’YYYY-MM-DD’?>
Using the Oracle Format Mask for Date
<?format-date:date_string;’ABSTRACT_FORMAT_MASK’;’TIMEZONE’?>
or
<?format-date-and-calendar:date_string;
‘ABSTRACT_FORMAT_MASK’;’CALENDAR_NAME’;’TIMEZONE’?>
or
<?format-date:hiredate;’YYYY-MM-DD’?>
Calendar and
Timezone Support tags are avaliable
Using
External Fonts
1. Copy the font to your <WINDOWS_HOME>/fonts directory.
1. Copy the font to your <WINDOWS_HOME>/fonts directory.
Advanced
Barcode Formatting
Register the
Barcode Encoding Class
Advanced
Design Options
Locating Data
Using XSL
Elements
Apply a
Template Rule
———————
———————
Use this
element to apply a template rule to the current element’s child nodes.
XSL Syntax: <xsl:apply-templates select=”name”>
BI Publisher Tag: <?apply:name?>
This function applies to <xsl:template-match=”n”> where n is the element name.
XSL Syntax: <xsl:apply-templates select=”name”>
BI Publisher Tag: <?apply:name?>
This function applies to <xsl:template-match=”n”> where n is the element name.
Copy the
Current Node
———————-
Use this element to create a copy of the current node.
XSL Syntax: <xsl:copy-of select=”name”>
BI Publisher Tag: <?copy-of:name?>
———————-
Use this element to create a copy of the current node.
XSL Syntax: <xsl:copy-of select=”name”>
BI Publisher Tag: <?copy-of:name?>
Call Template
————-
Use this element to call a named template to be inserted into or applied to the current
template. For example, use this feature to render a table multiple times.
————-
Use this element to call a named template to be inserted into or applied to the current
template. For example, use this feature to render a table multiple times.
XSL Syntax:
<xsl:call-template name=”name”>
BI Publisher
Tag: <?call-template:name?>
Template
Declaration
——————–
Use this element to apply a set of rules when a specified node is matched.
——————–
Use this element to apply a set of rules when a specified node is matched.
XSL Syntax:
<xsl:template name=”name”>
BI Publisher
Tag: <?template:name?>
Variable
Declaration
——————–
——————–
Use this
element to declare a local or global variable.
XSL Syntax:
<xsl:variable name=”name”>
BI Publisher
Tag: <?variable:name?>
Example:
——–
<xsl:variable name=”color” select=”‘red'”/>
Assigns the value “red” to the “color” variable. The variable can then be referenced in
the template.
——–
<xsl:variable name=”color” select=”‘red'”/>
Assigns the value “red” to the “color” variable. The variable can then be referenced in
the template.
Import
Stylesheet
—————–
Use this element to import the contents of one style sheet into another.
Note: An imported style sheet has lower precedence than the importing
style sheet.
—————–
Use this element to import the contents of one style sheet into another.
Note: An imported style sheet has lower precedence than the importing
style sheet.
XSL Syntax:
<xsl:import href=”url”>
BI Publisher
Tag: <?import:url?>
Define the
Root Element of the Stylesheet
—————————————–
This and the <xsl:stylesheet> element are completely synonymous elements. Both are used to define the root element of the style sheet.
Note: An included style sheet has the same precedence as the including
style sheet.
—————————————–
This and the <xsl:stylesheet> element are completely synonymous elements. Both are used to define the root element of the style sheet.
Note: An included style sheet has the same precedence as the including
style sheet.
XSL Syntax:
<xsl:stylesheet xmlns:x=”url”>
BI Publisher
Tag: <?namespace:x=url?>
Native XSL
Number Formatting
Extended
Function Support in RTF Templates
Extended SQL and XSL Functions
==========================================
Extended SQL and XSL Functions
==========================================
2+3
<?xdofx:2+3?> Addition
2-3 <?xdofx:2-3?> Subtraction
2*3 <?xdofx:2*3?> Multiplication
2/3 <?xdofx:2/3?> Division
2**3 <?xdofx:2**3?> Exponential
3||2 <?xdofx:3||2?> Concatenation
———————————————
lpad(‘aaa’,10,’.’)
2-3 <?xdofx:2-3?> Subtraction
2*3 <?xdofx:2*3?> Multiplication
2/3 <?xdofx:2/3?> Division
2**3 <?xdofx:2**3?> Exponential
3||2 <?xdofx:3||2?> Concatenation
———————————————
lpad(‘aaa’,10,’.’)
<?xdofx:lpad(‘aaa’,10,’.’)?>
lpad(string1,padded_length,[pad_string])
———————————————
rpad(‘aaa’,10,’.’)
———————————————
rpad(‘aaa’,10,’.’)
<?xdofx:rpad(‘aaa’,10,’.’)?>
rpad(string1,padded_length,[pad_string])
———————————————
decode(‘xxx’,’bbb’,’ccc’,’xxx’,’ddd’)
———————————————
decode(‘xxx’,’bbb’,’ccc’,’xxx’,’ddd’)
<?xdofx:decode(‘xxx’,’bbb’,’ccc’,’xxx’,’ddd’)?>
decode(expression,
search, result[,search, result]…[, default])
—————————————————————–
Instr(‘abcabcabc’,’a’,2)
—————————————————————–
Instr(‘abcabcabc’,’a’,2)
<?xdofx:Instr(‘abcabcabc’,’a’,2)?>
instr(string1,string2,[start_position],[nth_appearance])
——————————————————–
substr(‘abcdefg’,2,3)
——————————————————–
substr(‘abcdefg’,2,3)
<?xdofx:substr(‘abcdefg’,2,3)?>
substr(string,
start_position,[length])
———————————————
replace(name,’John’,’Jon’)
———————————————
replace(name,’John’,’Jon’)
<?xdofx:replace(name,’John’,’Jon’)?>
replace(string1,string_to_replace,[replacement_string])
——————————————————-
——————————————————-
to_number(‘12345’)
<?xdofx:to_number(‘12345’)?>
———————————————-
to_char(12345)
<?xdofx:to_char(‘12345’)?>
———————————————–
to_date
<?xdofx:to_date ( char [, fmt [,’nlsparam’]] )
———————————————–
sysdate()
<?xdofx:sysdate()?>
—————————————————-
minimum
<?xdoxslt:minimum(ELEMENT_NAME)?>
Returns the
minimum value of the element in the set.
—————————————————-
maximum
<?xdoxslt:maximum(ELEMENT_NAME)?>
Returns the
maximum value of the element in the set.
—————————————————-
chr
<?xdofx:chr(n)?>
—————————————————-
ceil
<?xdofx:ceil(n)?>
—————————————————-
round
<?xdofx:round ( number [, integer ])?>
—————————————————-
lower
<?xdofx:lower (char)?>
LOWER returns char, with all letters lowercase
LOWER returns char, with all letters lowercase
—————————————————-
upper
<?xdofx:upper(char)?>
UPPER returns char, with all letters uppercase.char can be any of the datatypes CHAR,VARCHAR2, NCHAR, NVARCHAR2, CLOB,or NCLOB
UPPER returns char, with all letters uppercase.char can be any of the datatypes CHAR,VARCHAR2, NCHAR, NVARCHAR2, CLOB,or NCLOB
—————————————————-
length
<?xdofx:length(char)?>
The “length” function returns the length of char
The “length” function returns the length of char
—————————————————-
greatest
<?xdofx:greatest ( expr [, expr]… )?>
GREATEST returns the greatest of the list of exprs
GREATEST returns the greatest of the list of exprs
—————————————————-
least
<?xdofx:least ( expr [, expr]… )?>
LEAST returns the least of the list of exprs.
LEAST returns the least of the list of exprs.
—————————————————-
–###########################################################
–LDT files For Oracle BI Publisher Stuff ( FNDLOAD Scripts )
–###########################################################
1.DATA_TEMPLATE (Data Source .xml file)
— ———————————————————-
–============================================================
— ———————————————————-
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD -DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=XX_SERVICE_NAME)))’ -LOB_TYPE DATA_TEMPLATE -LOB_CODE XX_TEMPLATE -APPS_SHORT_NAME XXCUST -LANGUAGE en -lct_FILE $XDO_TOP/patch/115/import/xdotmpl.lct -LOG_FILE $LOG_FILE_NAME
–LDT files For Oracle BI Publisher Stuff ( FNDLOAD Scripts )
–###########################################################
1.DATA_TEMPLATE (Data Source .xml file)
— ———————————————————-
–============================================================
— ———————————————————-
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD -DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=XX_SERVICE_NAME)))’ -LOB_TYPE DATA_TEMPLATE -LOB_CODE XX_TEMPLATE -APPS_SHORT_NAME XXCUST -LANGUAGE en -lct_FILE $XDO_TOP/patch/115/import/xdotmpl.lct -LOG_FILE $LOG_FILE_NAME
java oracle.apps.xdo.oa.util.XDOLoader UPLOAD
-DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION
‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=XX_SERVICE_NAME)))’
-LOB_TYPE DATA_TEMPLATE -LOB_CODE XX_TEMPLATE -XDO_FILE_TYPE XML -FILE_NAME
$DATA_FILE_PATH/$DATA_FILE_NAME.xml -APPS_SHORT_NAME XXCUST -NLS_LANG en
-TERRITORY US -LOG_FILE $LOG_FILE_NAME
2. RTF TEMPLATE
(Report Layout .rtf file)
— ———————————————————-
–============================================================
— ———————————————————-
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD -DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=XX_SERVICE_NAME)))’ -LOB_TYPE TEMPLATE -LOB_CODE XX_TEMPLATE -APPS_SHORT_NAME XXCUST -LANGUAGE en -TERRITORY US -lct_FILE $XDO_TOP/patch/115/import/xdotmpl.lct -LOG_FILE $LOG_FILE_NAME
— ———————————————————-
–============================================================
— ———————————————————-
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD -DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=XX_SERVICE_NAME)))’ -LOB_TYPE TEMPLATE -LOB_CODE XX_TEMPLATE -APPS_SHORT_NAME XXCUST -LANGUAGE en -TERRITORY US -lct_FILE $XDO_TOP/patch/115/import/xdotmpl.lct -LOG_FILE $LOG_FILE_NAME
java oracle.apps.xdo.oa.util.XDOLoader UPLOAD
-DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION
‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=SERVICE_NAME)))’
-LOB_TYPE TEMPLATE -LOB_CODE XX_TEMPLATE -XDO_FILE_TYPE RTF -FILE_NAME
$RTF_FILE_PATH/$RTF_FILE_NAME.rtf -APPS_SHORT_NAME XXCUST -NLS_LANG en
-TERRITORY US -LOG_FILE $LOG_FILE_NAME
—
————————————————————- ———————————————————-
–============================================================
—
————————————————————- ———————————————————-
Query to find
xml template and data definitions:
select
b.concurrent_program_name,
c.user_concurrent_program_name,
b.output_file_type,
e.executable_name,
e.execution_file_name,
e.execution_method_code,
a.application_short_name
,
a.data_source_name
“DATA DEFINITION NAME”,
a.data_source_code
“DATA DEFINITION CODE”,
d.template_name
“TEMPLATE NAME”,
d.template_code
“TEMPLATE CODE”,
d.template_type_code,
d.default_language,
d.default_territory,
f.file_name
from
xdo_ds_definitions_vl a,
fnd_concurrent_programs
b,
fnd_concurrent_programs_tl
c,
xdo_templates_vl
d,
fnd_executables
e,
xdo_lobs f
where
a.data_source_code = b.concurrent_program_name
and
b.concurrent_program_id = c.concurrent_program_id
and
a.data_source_code = d.data_source_code
and
e.executable_id = b.executable_id
and
f.lob_code = d.template_code
and
a.application_short_name = ‘FND’
and
b.concurrent_program_name like ‘FNDSCURS’
and e.EXECUTION_METHOD_CODE
like ‘P’
and
f.file_name like ‘%.rtf’
ORDER BY
EXECUTION_FILE_NAME
—————————————————————————-
–***********************************************************
—————————————————————————
Xml Interview FAQ
1.
What is BI
Publisher? Ans. It is a reporting tool for generating the reports. More than
tool it is an engine that can be
integrated
with systems supporting the business. 02. Is BI Publisher integrated with
Oracle Apps? Ans. Yes, it is tightly integrated with Oracle
Apps for reporting needs. In 11.5.10 instances xml publisher was used, in R12
we can it BI Publisher 03. What is the difference between xml publisher and BI
Publisher? Ans. Name is the difference, initially it was released on the name
of xml publisher ( the initial patchset), later on they have added more
features and called it Business Intelligence Publisher. In BI by default we
have integration with Data Definitions in R12 instance. Both these names can be
used interchangeably 04. What are the various components required for
developing a BI publisher report? Ans. Data
Template,
Layout
template and
the
integration with Concurrent Manager.
5.
How does the
concurrent program submitted by the user knows about the data template or layout
template it should be using for generating the output? Ans. The
concurrent program ‘shortname’ will be mapped to the ‘code’ of the
Datatemplate.
Layout
template is attached to the datatemplate; this forms the mapping between all
the three. 06. What is a datatemplate? Ans.
Datatemplate is an xml structure which contains the queries to be run against
the database so that desired output in xml format is generated, this generated
xml output is then applied on to the layout template for the final output. 07.
What is a layout template? Ans. 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. 08. What are the
output formats supported by layout template? Ans. xls, html,
pdf, eText etc are supported based on the business need. 09. Do you need to write
multiple layout templates for each output type like html/pdf? Ans.
No, only layout template will be created, BI Publisher generates desired output
format when the request is run 10. What is the default output format of the
report? Ans. The default output format defined during the layout template
creation will be used to generate the output, the same can be modified during
the request submission and it will overwrite the one defined at layout template
11. Can you have multiple layout templates for a singe data template?
Ans. Yes, multiple layouts can be defined; user has a choice here to use
one among them at run time during concurrent request submission.
12. Where do you register
data and layout templates? Ans. Data template will be registered under xml publisher
administrator responsibility> Data Definitions Layout template will be
registered under xml publisher administrator responsibility>Templates tab.
13. I want to create a report output in 10 languages, do I have to create 10
layout templates? Ans. No, BI Publisher provides the required translation for
your templates, based on the number of languages installed in your oracle apps
environment requires outputs are provided 14. What is the required installation
for using BI Pub report? Ans. BI Publisher Desktop Tool has be installed.
Using this tool you can preview or test the report before deploying the same on
to the instance. 15. How do you move your layout or data template across
instances? Ans. xdoloader is the utility that will be used.
16. What is the tool to map required data output and layout templates so that
they can be tested in local machine? Ans. Template viewer will be used
for the same. 17. Which component is responsible for generating the output in
xml format before applying it to layout template? Ans. Data Engine will
take Data Template as the input and the output will be generated in xml format
which will then be applied on layout template 15. Can BI publisher reports be
used in OAF pages? Ans. XDO template utility helper java classes
are provided for the same. 16. Name some business use cases for BI
reports? Ans. Bank EFT, customer documents, shipping documents, internal
analysis documents or any transactional documents 17. How do you pass
parameters to your report? Ans. Concurrent program parameters
should be passed, ensure that the parameter name/token are same as in the conc
prog defn and the data template 18. What are the various
sections in the data template? Ans.
Parameter section Trigger Section
Sql stmt section
Data Structure section
Lexical Section
13. What does lexical section
contain? Ans. The required lexical
clause of Key Flex field or Descriptive FF are created under this section
20. What triggers are supported in Data template?
Ans. Before report and After report
are supported 21. Where is the trigger code written?
Ans. The code is written in the plsql
package which is given under ‘defaultpackage’ tag of data template.
22. What is the file supporting the translation for a layout
template? Ans. xliff is the file that supports the translation, you can modify
the same as required. 23. How do you display the company logo on the
report output? Ans. Copy and paste the logo (.gif. or any format) on the
header section of .rtf file . Ensure you resize per the company standard