Wednesday, 14 November 2018

BI Publisher: setting xdoxslt based on condition

This will work under boilerplate text in rtf element

C1  EC C2  EC
<?xdoxslt:ifelse(TRANSACTION_TYPE='Available Receipts', 'Receipts', 'Payment')?>
<?xdoxslt:get_variable($_XDOCTX, 'ReceiptTotalVar')?>
<?xdoxslt:get_variable($_XDOCTX, 'PaymentTotalVar')?>

0.00

C1=>
<?if@inlines:TRANSACTION_TYPE='Available Receipts'?><?xdoxslt:set_variable($_XDOCTX, 'ReceiptTotalVar', sum(current-group()/ PAYMENT_RECEIPT_AMT))?>


EC=>
<?end if?>

C2=> <?if@inlines:TRANSACTION_TYPE='Available Payments'?><?xdoxslt:set_variable($_XDOCTX, 'PaymentTotalVar', sum(current-group()/ PAYMENT_RECEIPT_AMT))?>

Based on condition only variables will have values assigned.

0.00 =>

<?xdoxslt:get_variable($_XDOCTX, 'PaymentTotalVar')-xdoxslt:get_variable($_XDOCTX, 'ReceiptTotalVar')?>


No comments:

Post a Comment