Case Study:
- 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 <?ITEM_UNIT_PRICE * ITEM_QUANTITY?>
- 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