Friday, July 12, 2024

ERP BI - Case study 3 - Create RTF template for multiple groups or master details report.

Case Study:

  1. Show PO header information in FORM layout and PO Lines in Table Layout.
  2. Provide a report name
  3. Add header to insert company logo on the left side and date timestamps using extended XSL function on the right. <?xdoxslt:sysdate('DD-MON-YYYY HH24:MI')?>
  4. Always show a PO from a new page <?split-by-page-break:?>
  5. Decode the PO Status to a user friendly status using extended SQL function <?xdofx:decode(PO_STATUS, 'OPEN', 'Open PO', 'CLOSED', 'Closed PO', 'Others')?>
  6. Calculate Line Amount <?ITEM_UNIT_PRICE * ITEM_QUANTITY?>
  7. Calculate the PO Amount (Sum of all line amount)
<?xdoxslt:set_variable($_XDOCTX,'TotLineAmt',0)?>
<?xdoxslt:set_variable($_XDOCTX,'LineAmt',ITEM_UNIT_PRICE * ITEM_QUANTITY)?>
<?xdoxslt:set_variable($_XDOCTX,'TotLineAmt',
xdoxslt:get_variable($_XDOCTX,'TotLineAmt')+ xdoxslt:get_variable($_XDOCTX,'LineAmt'))?>

2 & 3 can be combined into one statement

<?xdoxslt:set_variable($_XDOCTX,'TotLineAmt',
xdoxslt:get_variable($_XDOCTX,'TotLineAmt')+ ITEM_UNIT_PRICE * ITEM_QUANTITY)?>

<?xdoxslt:get_variable($_XDOCTX,'TotLineAmt')?>

  8. Show Total Line Amount or PO Amount un words

<?xdoxslt:toCheckNumbers($_XDOLOCALE,xdoxslt:get_variable($_XDOCTX,'TotLineAmt'), 'USD')?>

Extended XSL and SQL functions support in RTF templates:


Detailed Screenshots:

Show PO header information in FORM layout and PO Lines in Table Layout.














Provide a report name
Add header to insert company logo on the left side and date timestamps using extended XSL function on the right. <?xdoxslt:sysdate('DD-MON-YYYY HH24:MI')?>









Always show a PO from a new page <?split-by-page-break:?>


Decode the PO Status to a user friendly status using extended SQL function <?xdofx:decode(PO_STATUS, 'OPEN', 'Open PO', 'CLOSED', 'Closed PO', 'Others')?>



Calculate Line Amount:



Calculate the PO Amount (Sum of all line amount)





Show Total Line Amount or PO Amount un words




No comments:

Post a Comment

Featured Post

OIC - how can I use XSLT functions to remove leading zeros from numeric and alphanumeric fields?

To remove leading zeros from an numeric field in Oracle Integration Cloud (OIC) using XSLT, you can Use number() Function The number() funct...