dividing the sum of two value in each group in a number format using rtf
Hi,
I try to divide the sum of two value in each group and then I got the result. Now I want the result to in a number format '#,##0.00' but I got an error 'XML-22047: (Error) Invalid instantiation of 'xsl:when' in '_h' context.' How can I do that? Please see my code below, it's working if I remove the xdofx:format_number.
<?xdoxslt:set_variable($_XDOCTX, 'a', sum(current-group()/OR_AMOUNT))?>
<?xdoxslt:set_variable($_XDOCTX, 'b', sum(current-group()/WT_TOTAL))?>
<?xdofx:format_number(<?choose:?><?when: sum(current-group()/OR_AMOUNT)=0?>0<?end when?><?when: sum(current-group()/OR_AMOUNT)>0?>