Tuesday, 10 September 2019

How to fetch previous record amount value as reference in current record at BI Report RTF level




Example: Report level balance is required to calculate based on the following formula.

Opening Balance: CF_DR_OB (Opening Debit Balance) - CF_CR_OB (Opening Credit Balance)
Balance: Opening Balance + (Debit line amount – Credit line amount)

Note: CF_DR_OB & CF_CR_OB are RDF level defined formula column.

Report Output Format:




Step 1: Set Temp local variable tag at RTF level:
<?xdoxslt:set_variable($_XDOCTX, 'RTotalVar', (CF_DR_OB - CF_CR_OB))?>



Step 2: Create Line Amount Variable tag:
<?xdoxslt:set_variable($_XDOCTX, 'RTotalVar',xdoxslt:get_variable($_XDOCTX,'RTotalVar') + (xdoxslt:to_number(PAY_AMT_DR) - xdoxslt:to_number(INV_AMT_CR) ))?>






Now upload the RTF file and execute the report you will get the expected solution.





No comments:

Post a Comment

Note: only a member of this blog may post a comment.