This content has been marked as final. Show 6 replies
you can try like below
<?if:AMT!=0?>your form field with format (#,##0.00)<?end if?><?if:AMT=0?>0.00<?end if?>
<?xdoxslt:ifelse(formfield!=0,concat ( '(',formfield,')' ),formfield) ?>
Edited by: user3209802 on Feb 21, 2013 10:03 PM
Excellent! It worked
I modified it little bit, which otherwise is showing 0 as 0 instead of 0.00.
<?xdoxslt:ifelse(FORM_FIELD!=0,concat ( '(',FORM_FIELD,')' ),'0.00') ?>
The below one is even better as I needed comma separator for thousands:
<?xdoxslt:ifelse(RECEIPT_AMT!=0,concat ( '(',(xdoxslt:pat_format_number(RECEIPT_AMT,'##,##0.00',$_XDOLOCALE)),')' ),'0.00')?>
you are welcome !!
In my case, it is not working. Below is the issue, which I am facing.
If the number is greater than 3 digits then it is perfect but if it is 3 digits or less than the format is not as expected. e.g.,
12345 is displayed as => 12,345.00 (Correct)
1234 is displayed as => 1,234.00 (Correct)
123 is displayed as => 123 (Wrong) should be displayed as 123.00
0 is displayed as => 0 (Wrong) should be displayed as 0.00