TO DECLARE/SET A VARIABLE VALUE:
-------------------------------
<?xdoxslt:set_variable($_XDOCTX, 'variable name', value)?>
<?xdoxslt:set_variable($_XDOCTX,’V_EMP’,0)?>
TO PERFORM CALCULATIONS.
------------------------------------
<?xdoxslt:set_variable($_XDOCTX, 'x', xdoxslt:get_variable($_XDOCTX, 'x' + 1)?>
This sets the value of variable 'x' to its original value plus 1,
much like using "x = x + 1".
The $_XDOCTX specifies the global document context for the variables.
In a multi-threaded environment there may be many transformations occurring
at the same time, therefore the variable must be assigned to a single
transformation.
<?xdoxslt:set_variable($_XDOCTX,’V_EMP’,xdoxslt:get_variable($_XDOCTX,’V_EMP’) + EMP)?>
TO RETRIEVE A VARIABLE VALUE:
----------------------------
<?xdoxslt:get_variable($_XDOCTX, 'variable name')?>
<?xdoxslt:get_variable($_XDOCTX,’V_EMP’)?>
IF THEN ELSE
-------------
<?xdofx:if EMP > 2 then ’Higher’
else
if EMP <2 then ’Lower’
else
’Equal’
end if?>
ROW / COLUMN HIGHLIGHTING
----------------------------
<?if@row:position() mod 2=0?>
<xsl:attribute name="background-color" xdofo:ctx="incontext">green</xsl:attribute><?end if?>
EXTENDED SQL AND XSL FUNCTIONS
--------------------------------
<?xdofx:rpad(concat(FIRST_NAME,LAST_NAME),30, 'x')?>
Ref: Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher
CREATION OF PAGE TOTAL ELEMENT
-------------------------------------------
<?add-page-total:TotalFieldName;'element'?>
Example:
<?add-page-total:totalemp;'EMP'?>
DISPLAYING PAGE TOTAL
---------------------------------------
<?show-page-total:TotalFieldName;'number-format'?>
Example:
<?show-page-total:totalemp;$#,##0.00;($#,##0.00)?>
CREATING MULTIPLE OR COMPLEX HEADERS AND FOOTERS
--------------------------------------------------
If the template requires multiple headers and footers, then create them by using BI Publisher tags to define the body area of the report. You may also want to use this method if the header and footer contain complex objects that you want to place in form fields. When you define the body area, the elements occurring before the beginning of the body area compose the header. The elements occurring after the body area compose the footer.
Use the following tags to enclose the body area of the report:
<?start:body?>
<?end body?>
Use the tags either directly in the template, or in form fields.
The Payables Invoice Register contains a simple header and footer and therefore does not require the start body/end body tags. However, if you wanted to add another header to the template, define the body area.
To define the body area:
Insert <?start:body?> before the Suppliers group tag:
<?for-each:G_VENDOR_NAME?>
Insert <?end body?> after the Suppliers group closing tag:
<?end for-each?>
https://docs.oracle.com/cd/E29505_01/bi.1111/e22254/create_rtf_tmpl.htm#do_handf