Thursday, October 29, 2020

Commonly used RTF Functions

Date formatting

<?xdoxslt:ora_format_date(Date,'mm/dd/yyyy')?>

 

To format date or timestamp based on application Preferences

    <?format-date:Date_Only_Field; 'XDODEFDATE'?>

    <?format-date:Time_Only_Field; 'XDODEFTIME'?>

 

Relative date

<?xdoxslt:ora_format_date_offset('2009-06-03',1, '+')?>

result 2009-06-04

 

sysdate

<?xdoxslt:sysdate_as_xsdformat()?>

<?xdofx:sysdate()?>

 

Replacing null value

<?xdofx:nvl(parameter,'All')?>

 

Difference

<?xdofx:to_number(Number1)-to_number(Number2)?>

 

Page Break

<?split-by-page-break:?>

 

Page Functions

Setting Initial Page Number

<?initial-page-number:'auto'?>

Numbering

<?fo:page-number?>

 

Last Page Only Content

<?start@last-page:body?>

<?end body?>

 

To force Report to end on odd/even page

<?section:force-page-count;'end-on-even'?>

 

<?section:force-page-count;'end-on-odd'?>

 

Variables

 Initializing the Variable:

<?xdoxslt:set_variable($_XDOCTX, 'Variable Name’, 0)?>

Getting the Variable:

<?xdoxslt:get_variable($_XDOCTX, 'Variable Name’)?>

 

Sub Template

Defining Template

<?template:template_name?>

                                      ..contents...

<?end template?>

Calling Template

<?call:template_name?>

 

Importing sub template from folder:

Shared Folders:

<?import:xdoxsl:///Custom/Executive/HR_Reports/mySubtemplate.xsb?>

 

My folders:

<?import:xdoxsl:///~myuser/Subtemplates/Template1.xsb?>

 

  Conditional Formatting

If Condition

<?if:condition?>

            ..content..

<?end if?>

 

Choose Statement

<?choose:?>

<?when: condition?>..content.. <?end when?>

<?otherwise?>..content<?end otherwise?>

<?end choose?>

 

Getting ancestor value

<?ancestor-or-self::*/Column?>

No comments:

Post a Comment