Saturday, 24 January 2015

XML RTF Template Techniques



Tag Description
Tag Syntax
Enter into Loop
<?for-each: group_name?>
Exit the Loop
<?end for-each?>
Display any Column
<?column_name?>
Start IF condition
<?if: column_name=1?>
End IF condition
<?end if?>
To access report level place holders
/main_group_name/column_name
To use SQL functions
<?xdofx:trim(column_name)?>
To display current date
<?xdofx:sysdate?>
To display page number
<?fo:page-number?>
Start Body
<?start:body?>
End Body
<?end body?>
For Page Break
Press Ctrl + Enter before end of loop
Sort
<?sort:column_name?>



















https://blogs.oracle.com/xmlpublisher/dynamic-sorting-or-sort-by-parameter

<?for-each: group_name?>
<?sort:elementName;'descending';data-type='text'?>

elementName is element within for-each group

xdofx: substr, instr and if else cases

<?xdofx:Instr('abcabcabc','a',2)?>
<?xdofx:substr('abc-defg',1,Instr('abc-defg','-',1))?>
<?xdofx:if 1=1 then substr('abc-defg',1,Instr('abc-defg','-',1)) else substr('abcd-defg',1,Instr('abcd-defg','-',1)) end if?>
<?xdofx:if AE_PER_GRADE!='' then substr(AE_PER_GRADE,1,Instr(AE_PER_GRADE,'-',1)) else substr(AE_TERM_GRADE,1,Instr(AE_TERM_GRADE,'-',1)) end if?>








No comments:

Post a Comment