2/23/23, 11:15 AM Oracle Applications: USEFULL XML TAGS IN BI PUBLISHER
More
Oracle Applications
Friday, 6 January 2017 About Me
Unknown
USEFULL XML TAGS IN BI PUBLISHER
View my complete profile
XSL Equivalents
Blog Archive
The following table lists the BI Publisher simplified syntax with the XSL equivalents.
Supported XSL BI Publisher ▼
▼ 2017 (12)
Elements Description Syntax ▼
▼ January (12)
<xsl:value-of select= Placeholder syntax <?name?> SQL LOADER COMPLETE DOCUMENT
"name"> REPORT BUILDER COMPLETE
DOCUMENT
<xsl:apply-templates Applies a template rule to the current element's child <?apply:name?
select="name"> nodes. > ORACLE APPS TECHNICAL COURSE
DOCUMENT
<xsl:copy-of Creates a copy of the current node. <?copy-
WORK FLOW COMPLETE PROCESS
select="name"> of:name?> IN ORACLE APPS
<xsl:call-template Calls a named template to be inserted into/applied to the <?call:name?> INVENTORY CREATION IN ORACLE
name="name"> current template. APPS
USEFULL XML TAGS IN BI PUBLISHER
<xsl:sort select="name"> Sorts a group of data based on an element in the dataset. <?sort:name?>
PO,AP_INVOICE_ALL CODING IN
<xsl:for-each Loops through the rows of data of a group, used to <?for- ORACLE APPS
select="name"> generate tabular output. each:name?>
ORDER MANAGEMENT REALTIME
<xsl:choose> Used in conjunction with when and otherwise to express <?choose?> CODING
multiple conditional tests. INVENTORY CREATION PROCESS IN
ORACLE APPS
<xsl:when test="exp"> Used in conjunction with choose and otherwise to express <?
multiple conditional tests when:expressio GL MODULE PROCESS IN ORACLE
n?> APPS
FND_USER QUERIES IN ORACLE
<xsl:otherwise> Used in conjunction with choose and when to express <?otherwise?> APPS
multiple conditional tests
BACKEND TABLES IN ORACLE APPS
<xsl:if test="exp"> Used for conditional formatting. <?
if:expression?> ►
► 2016 (2)
<xsl:template Template declaration <?
name="name"> template:name?
>
<xsl:variable Local or global variable declaration <?
name="name"> variable:name?
>
<xsl:import href="url"> Import the contents of one stylesheet into another <?import:url?>
<xsl:include href="url"> Include one stylesheet in another <?include:url?>
<xsl:stylesheet Define the root element of a stylesheet <?
xmlns:x="url"> namespace:x=u
rl?>
xml tags:
---------
<?if@row:SAL>3000?>
<xsl:attribute xdofo:ctx="incontext" name=background-color">red
<?end if?>
<?if@row:SAL<2000?>
<xsl:attribute name="background-color" xdofo:ctx="incontext">silver</xsl:attribute><?end if?>
<?if@row:SAL>3000?>
<xsl:attribute name="background-color" xdofo:ctx="incontext">red</xsl:attribute>
<?end if?>
<?if@row:SAL>3000?>
<xsl:attribute name="background-color" xdofo:ctx="incontext">red</xsl:attribute>
<?end if?>
alioracleapps.blogspot.com/2017/01/usefull-xml-tags-in-bi-publisher.html 1/6
2/23/23, 11:15 AM Oracle Applications: USEFULL XML TAGS IN BI PUBLISHER
To apply colors in column depending on condition:
----------------------------------------------------------------
<?if:SAL>5000?>
<xsl:attribute xdofo:ctx="block" name="background-color"> red</xsl:attribute>
<?end if?>
Column level color:
----------------------
<xsl:attribute xdofo:ctx="block" name="background-color">green</xsl:attribute>
To apply colors in row level based on condition:
-------------------------------------------------------------
<?if@row:SAL>5000?>
<xsl:attribute xdofo:ctx="block" name="background-color"> red</xsl:attribute>
<?end if?>
<?if:position() mod 4=0?>
<xsl:attribute name="break-before">page</xsl:attribute>
<?end if?>
<?if:count(G_ENAME)=0?> No data found<?end if?>
<?start@last-page-first:body?> <?end body?>
This is last page
need search
or
<?if:position() = last()?>
--------------- Reports is ended bosss-----------------
<? end if ?>
<?if:position() >=1?>
--------------- Reports is ended bosss-----------------
<? end if ?>
page total
-------------
<?add-page-total:pagetot;'SAL'?> dummy column beside the column(means ex:sal) in insideof for-each
ex:sal and comm
<?show-page-total:pagetot;’999G999D99’?> out of foreach just print any where in page
Running total print
-------------------------
1.<?xdoxslt:set_variable($_XDOCTX, 'R', 0)?> declare this tag out of foreach just print any where in
page
2.<?xdoxslt:set_variable($_XDOCTX, 'R', xdoxslt:get_variable($_XDOCTX,'R') + SAL)?>
<?xdoxslt:get_variable($_XDOCTX, 'R')?> delare this inside of for loop and take one separate column like
empno,sal and
add the showing second tag in helptext field than this tag get the data like sum of sal
Choose condition:
---------------------
take the separate column and paste this in Form field help text inside of For each group.
<?choose:?>
<?when: .//SAL>3000?>
higher
<?end when?>
<?when: .//SAL<2000?>
lower
<?end when?>
<?otherwise:?>
equal
<?end otherwise?>
<?end choose?>
How to insert page numbers:
---------------------------------
first select the header/footer options in view .in header section draw table like column one
after put the cursor on that table next go to insert take page numbers option.ofter run the template .it will
show the page
alioracleapps.blogspot.com/2017/01/usefull-xml-tags-in-bi-publisher.html 2/6
2/23/23, 11:15 AM Oracle Applications: USEFULL XML TAGS IN BI PUBLISHER
numbers.
or
Now i want to print page numbers and also total page number:
--------------------------------------------------------------------------------
first select the header/footer options in view .in header section draw table like column one
after put the cursor on that table next go to insert take field option-->choose the numpages-->click on OK
button.
after run the template we will see like (1/3,2/3,3/3)
here 1,2,3 are page numbers and 3 is total page number.
GROUP BY:
----------------
<?for-each-group:G_ENAME;./DEPTNO?>
<?sort:DEPTNO;'descending';data-type='number'?>
In above tag display the table data department wise. place this tag outside for-each
<?for-each-group:ROW;./DNAME?>
<?sort:DNAME;'ascending';data-type='text'?> <?end for-each-group?>
The above command is specifying that the ROW group should be then grouped by DNAME.
Currency conversion from number to word:
--------------------------------------------------------
<?xdoxslt:toWordsAmt(round(CS_1))?>
For system date:
---------------------
Customized ----> Date:<?xdoxslt:sysdate(‘DD/MM/YYYY’)?>
Date: <?xdoxslt:sysdate(‘DD:MM:YYYY HH:MI:SS’)?>
Standard ------> Date: <?xdoxslt:sysdate()?>
Apply color to the SAL>3000 in SAL column using xml tag:
---------------------------------------------------------
<?if:SAL>3000?>
<xsl:attribute xdofo:ctx="block" name="background-color"> red</xsl:attribute>
<?end if?>
Row level inside the for each group:
---------------------------------------------
<?if@row:SAL>3000?>
<xsl:attribute xdofo:ctx="block" name="background-color"> red</xsl:attribute>
<?end if?>
Using position:
------------------
<?if:position() mod 5=0?>
<xsl:attribute name=”break-before”></xsl:attribute>
<?end if?>
<?if@row:position() mod 5=0?>
<xsl:attribute name="background-color" xdofo:ctx="incontext">red</xsl:attribute>
<?end if?>
To print deptno descending order:
--------------------------------------------
<?for-each-group:G_ENAME;./DEPTNO?>
<?sort:DEPTNO;'descending';data-type='number'?>
<?end for-each-group?>
To start body and end body:
-----------------------------------
<?body-start?>
<?body-end?>
To add format to salary:
-------------------------
<?format-number(SELLING_PRICE1,'0.0000')?>
To write description:
---------------------
<?if: CS_MPA_DISP !=0?> Material Price Adjustment <?end if ?>
alioracleapps.blogspot.com/2017/01/usefull-xml-tags-in-bi-publisher.html 3/6
2/23/23, 11:15 AM Oracle Applications: USEFULL XML TAGS IN BI PUBLISHER
Calling template at header/footer level:
----------------------------------------------
<?template:footer?>
<?end template?>
if you want to call template footer body in footer section than use given tag
<?call:footer?>
or
<?template:header?>
<?end template?>
if you want to call template header body in header section than use given tag
<?call:header?>
or
<?template:header?>
EMPLOYEE DETAILS
<?end template?> //WRITE THESE IN HEADER FORM AND CALL IN THE WORKING
<?call-template:header?> //WRITE THESE WHERE U NEED
If condition for for invoice:
-----------------------------
<?if: TRANSACTION_TYPE_NAME >= ‘Invoice’?> Please Pay this Amount: <?end if ?>
<?if: TRANSACTION_TYPE_NAME != ‘Invoice’?> Amount Credited: <?end if ?>
sum the salary column wise:
-----------------------------------
SUM:<?2+3?>
<?xdoxslt:sum(SAL)+xdoxslt:sum(COMM)?>
<?sum(current-group()//SAL)?> //when ever we use double group it shows total sal for current group
PAGE BREAK:
-------------------
<?split-by-page-break:?>
(OR)
<?for-each-group@section:G_EMPNO;DEPTNO?>//AUTOMATICALLY IT SPLIT DEPT WISE
ADD & SHOW PAGE TOTAL:
--------------------------------------
<?add-page-total:t;’SAL’?>
<?show-page-total:t?>
SET PASSWORD THAT OUTPUT IS NOT SEEN IN PDF FROMAT:
------------------------------------------------------------------------------------------
1) Open the .rtf
2) Go to File - > Properties
Create a new custom property
a) Name : xdo-pdf-open-password
Type : text
Value : Either Hard Code the vale / or get the value for xml data
b) Name : xdo-pdf-security
Type : text
Value : true
Concatenation tag:
------------------------
<?xdofx:rpad(FIRST_NAME||LAST_NAME),30,'x')?>
<?value-of:concat(Payee/Address/City,’, ‘,Payee/Address/State)?>
If tag:
-------
<?IF:COMM=’’?>SRY<?END IF?><?IF:COMM!=’’?><?COMM?><?END IF?>
Else if:
--------
<?xdofx:if COMM!='' then SAL+COMM else SAL end if?>
DECODE TAG:
---------------------
<?xdofx:decode(COMM,’’,’sry’,COMM)?>
<?xdofx:decode(COMM,’’,ENAME,COMM||’, ’||ENAME)?>
CHR:
-------
<?xdofx:chr(65)?>
<?xdofx: to_char(sysdate,'dd-mm-yyyy')?>
alioracleapps.blogspot.com/2017/01/usefull-xml-tags-in-bi-publisher.html 4/6
2/23/23, 11:15 AM Oracle Applications: USEFULL XML TAGS IN BI PUBLISHER
ROUND:
-----------
<?xdofx: round(9.6)?>
PAGE LAYOUT:
----------------------
IT DISPLAYS INFORMATION LIKE NOTE,TERMS ETC IN THE ODD OR EVEN PAGE.
IN HEADERS AND FOOTERS REGION WE CAN DISPLAY GO TO FILE AND SELECT PAGE
SETUP AND
SELECT LAYOUT TAB THERE CHECK THE OPTIONS.
<?section:force-page-count;'end-on-odd-layout'?>
<?section:force-page-count;'end-on-even-layout'?>
OUT SIDE FORMULA COLUMN:
------------------------------------------
function CF_1Formula return Date is
dnm varchar2(30);
begin
:cp_1:=SYSDATE;----dynamic current date.
:cp_3:=:dno;----it is for dynamic deptno
select dname into dnm from dept where deptno=:dno;--it is for dynamic dname
:cp_4:=dnm;
return :cp_1; end;
IN SIDE FORMULA COLUMN:
----------------------------------------
function CF_2 Formula return Number is
begin
:cp_2:=(:sal+nvl(:comm,0));----FOR TOTAL AMT
:CP_5:=NVL(:COMM,0);----where comm is null there assign zero.
return :cp_2;
end;
MS Word 2003 - rtf Template
--------------------------------------
* Insert a dummy image in the template.
* Right Click --> In the Format Picture dialog box select the Web tab.
* Enter the following syntax in the Alternative text region to reference the image URL:
* url:{'http://image location'}
e.g.: url:{'http://www.oracle.com/images/ora_log.gif'}
MS Word 2007 -- rtf Template
---------------------------------------
* Insert a dummy image in the template.
* Right click --> Size
* Enter the following syntax in the Alternative text region to reference the image URL:
* url:{'http://image location'}
e.g.: url:{'http://www.oracle.com/images/ora_log.gif'}
Type of User Exits
SRW.USER_EXIT (‘FND SRWINIT’);
SRW.USER_EXIT (‘FND SRWEXIT’);
SRW.USER_EXIT (‘FND FLEXSQL’);
SRW.USER_EXIT (‘FND FLEXVALID’);
SRW.USER_EXIT (‘FND FORMAT_CURRENCY’);
Description
1) SRW.USER_EXIT (‘FND SRWINIT’);
Is used to initialize profile values.
2) SRW.USER_EXIT (‘FND SRWEXIT’);
Is used to free the memory allocated.
3) SRW.USER_EXIT (‘FND FLEXSQL’);
Is used to capture description of code combinations.
4) SRW.USER_EXIT (‘FND FLEXVALID’);
Is used to capture code combination ID.
5) SRW.USER_EXIT (‘FND FORMAT_CURRENCY’);
Is used to format currency.
alioracleapps.blogspot.com/2017/01/usefull-xml-tags-in-bi-publisher.html 5/6
2/23/23, 11:15 AM Oracle Applications: USEFULL XML TAGS IN BI PUBLISHER
Where the five User Exits are used
In Before Report trigger SRW.USER_EXIT (‘FND SRWINIT’);
SRW.USER_EXIT (‘FND FLEXSQL’);
SRW.USER_EXIT (‘FND FLEXVALID’);
SRW.USER_EXIT (‘FND FORMAT_CURRENCY’);
In After Report trigger SRW.USER_EXIT (‘FND SRWEXIT’);
Posted by Unknown at 11:09
6 comments:
Kasun Dasanayake 17 September 2019 at 03:22
This comment has been removed by the author.
Reply
Kasun Dasanayake 17 September 2019 at 03:23
This comment has been removed by the author.
Reply
AA 15 January 2020 at 06:57
Hi,
Thank you for for the post!
Quick question: would it be possible to put RTC(real time clock: hh:mm:ss) into BI publisher
template? Let's say, the business needs to print 1000 labels and instead of a 'current timestamp' -
which will be all the same on all labels, the output with RTC will be
different...hh:mm:01....hh:mm:02...
I will appreciate if get back to me. Thanks. Alex
Reply
alam 22 December 2021 at 02:02
If more people that write articles really concerned themselves with writing great content like you,
more readers would be interested in their writings. Thank you for caring about your content.
kündigen
Reply
samee 16 May 2022 at 10:39
Very useful info. Hope to see more posts soon!. brand name generator
Reply
ashok kumar 16 June 2022 at 11:43
Great work. Summarized most of the Dev methods
Reply
Enter comment
Newer Post Home Older Post
Subscribe to: Post Comments (Atom)
Simple theme. Powered by Blogger.
alioracleapps.blogspot.com/2017/01/usefull-xml-tags-in-bi-publisher.html 6/6