<?start:body?>
<?xdoxslt:xdo_format_number_l(100000,'999G999D99','EN-us')?>
O/P:- 100,000.00
<?xdoxslt:xdo_format_number_l(100000,'999G999D99','DE-de')?>
O/P:- 100.000,00
Repeating the Output Based on the String Length
Repeating the Output Data as needed
We can also use below syntax for before and after
<xsl:attribute name="break-before">page</xsl:attribute>
<xsl:attribute name="break-after">page</xsl:attribute>
Conditional pagebreak, use below syntax.
Here we are inserting page-break if value of variable no_of_lines_per_page is equal to total records in loop inner_group. Variable is always referred by $ in XSL
<xsl:if xdofo:ctx="inblock" test="$no_of_lines_per_page=count($inner_group)">
<xsl:attribute name="break-before">page</xsl:attribute>
</xsl:if>
Multiple Date Formats
------------------------
<?xdoxslt:to_char(DATECREATED,'DD-MON-YYYY')?>
<?format-date:hiredate;'SHORT'?>
<?format-date:hiredate;'YYYY-MM-DD'?>
<?xdoxslt:sysdate(“DD-Mon-YY”)?>
<?initial-page-number:'AUTO'?>
<?initial-page-number:PAGESTART?>
<?initial-page-number:$PAGESTART?> --Parameter
Number Format
---------------
<?choose:?><?when:./PERIOD_NET_CR!=""?><?format-number:./PERIOD_NET_CR;'99G990D00'?><?end when?><?otherwise:?><?format-number:0.00;'0D00'?><?end otherwise?><?end choose?>
<?xdoxslt:set_variable($_XDOCTX, ’CC1’, ./ACCOUNTING_CODE_COMBINATION)?>
<? xdoxslt:get_variable($_XDOCTX, ’CC1’)?>
<?end body?>
The text occurring before the <?start:body?> tag treated as a Header.
The text occurring in between <?start:body?> and <?end body?> treated as a Body.
The text occurring after the <?end body?> treated as a footer.
<?xdoxslt:sysdate()?>
<?xdoxslt:sysdate('DD/MM/YY HH:MI:SS')?>
To get the Date in RTF Report, For Displaying Current System Date in Layout we have to use tis Tag.
<?for-each@section:G_DEPTNO?>
Use @section to split the page at every deptno level.
The problem with @section is if we don’t have data the output will not open.
And we can’t use @section more than once per a layout.
<?split-by-page-break:?>
We can use split-by-page-break , how many times we want in a single layout.
We have to use this tag exactly before end tag of any group
Don’t use the split-by-page-break in the same line of data row.
url:{concat('${OA_MEDIA}','/',IMAGE_FILE)}
For this you have to do below setps:
1. Insert a dummy image in your template.
2. In Microsoft Word's 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'}
For example, enter: url:{'http://www.oracle.com/images/ora_log.gif'}
If we want to display main group elements in the sub group like “empno” in “dept” group. We have to place the ../../ before the tag (../../empno)
<?start@last-page:body?>< ?end body?>
If you want to display the total in last page use this command
<?if@row:SAL> 3000?>
<xsl:attribute xdofo:ctx="incontext" name="background-color">red
The Color will apply to entire row by using “@row” attribute.
If you remove the “@row” the color will apply to that single column only.
The Xdofx:ctx has two values 1.incontext 2.block
<?if:SAL> 2500 ?>
<?end if?>
If you want to hide the Rows use this command in Group level
<?init-page-total: pst?>
<?add-page-total:pst;'SAL'?>
<?show-page-total:pst;'C9G990D00';'(C9G990D00)'?>
to show page wise totals
If you are using sum(sal) function in the any rtf file, if at least one sal field contains salary null the output will not generated it will give an error. To get a correct result you have to handle null columns like below
Use sum(sal[.!=’’])
create a variable
<?xdoxslt:set_variable($_XDOCTX, 'V_NUM', 0)?>
incremet / decrement variable
<?xdoxslt:set_variable($_XDOCTX, ‘V_NUM’, xdoxslt:get_variable($_XDOCTX, ‘V_NUM’) + 1)?>
display variable
<?xdoxslt:get_variable($_XDOCTX, 'V_NUM')?>
<?for-each-group:CD;COUNTRY?>
<?for-each-group:current-group();YEAR?>
<?for-each:current-group()?>
<?end for-each?>
<?end for-each-group?>
<?end for-each-group?>
Number Formatting
<?xdoxslt:xdo_format_number_l(100000,'999G999D99','EN-us')?>
O/P:- 100,000.00
<?xdoxslt:xdo_format_number_l(100000,'999G999D99','DE-de')?>
O/P:- 100.000,00
Repeating the Output Based on the String Length
<?xml version="1.0" encoding="WINDOWS-1252" ?>
<juvva>
<test>kranthi</test>
</juvva>
<?xdoxslt:set_variable($_XDOCTX, 'cnt',string-length(test))?>
<?for-each:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX, 'cnt'),1)?>
XYZ
<?end for-each?>
O/P :- XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
XYZ
<?xml version="1.0" encoding="WINDOWS-1252" ?>
<ROWSET>
<ROW>
<DEPT>Z1</DEPT>
<DATA>2112</DATA>
</ROW>
<ROW>
<DEPT>A1</DEPT>
<DATA>7985</DATA>
</ROW>
<ROW>
<DEPT>B1</DEPT>
<DATA>8452</DATA>
</ROW>
<ROW>
<DEPT>B2</DEPT>
<DATA>2159</DATA>
</ROW>
</ROWSET>
<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,2,1)?>
<?for-each:/ROWSET/ROW?> <?DEPT?> <?end for-each?>
<?end for-each?>
O/P :- Z1
A1
B1
B2
Z1
A1
B1
B2
-- @section Gives the data in new page
We can also use below syntax for before and after
<xsl:attribute name="break-before">page</xsl:attribute>
<xsl:attribute name="break-after">page</xsl:attribute>
Conditional pagebreak, use below syntax.
Here we are inserting page-break if value of variable no_of_lines_per_page is equal to total records in loop inner_group. Variable is always referred by $ in XSL
<xsl:if xdofo:ctx="inblock" test="$no_of_lines_per_page=count($inner_group)">
<xsl:attribute name="break-before">page</xsl:attribute>
</xsl:if>
Multiple Date Formats
------------------------
<?xdoxslt:to_char(DATECREATED,'DD-MON-YYYY')?>
<?format-date:hiredate;'SHORT'?>
<?format-date:hiredate;'YYYY-MM-DD'?>
<?xdoxslt:sysdate(“DD-Mon-YY”)?>
<?initial-page-number:'AUTO'?>
<?initial-page-number:PAGESTART?>
<?initial-page-number:$PAGESTART?> --Parameter
Number Format
---------------
<?choose:?><?when:./PERIOD_NET_CR!=""?><?format-number:./PERIOD_NET_CR;'99G990D00'?><?end when?><?otherwise:?><?format-number:0.00;'0D00'?><?end otherwise?><?end choose?>
<?xdoxslt:set_variable($_XDOCTX, ’CC1’, ./ACCOUNTING_CODE_COMBINATION)?>
<? xdoxslt:get_variable($_XDOCTX, ’CC1’)?>
No comments:
Post a Comment