Thanks for that reply, Nello, and that will do the job for the specific case that I have given.
 
What I didn't make clear was that I do not just want to truncate that particular case.
 
I want both formats to ROUND the same way - rather than the different ways that they do at present.  If the 3rd decimal place is anything but 5 there is no problem - both methods round correctly.
 
However, when the 3rd decimal is 5 then one method rounds up and the other rounds down.  I need to find a way to ensure that both methods give a consistent result - I don't mind whether its up or down.
 
Any other thoughts?
 
 
----- Original Message -----
Sent: Tuesday, April 24, 2001 1:30 AM
Subject: Re: [DUG]: Currency Formats

Label2.Caption := FormatCurr('$###,##0.00', trunc(v*100) * 0.01);
-ns
----- Original Message -----
Sent: Wednesday, April 25, 2001 7:49 AM
Subject: [DUG]: Currency Formats

Hi
 
Have a problem with consistency of reporting currency between two QR reports.
 
The value of QRExpr1 is 234345.675
 
One report assigns the currency value to a label caption as follows:
Label1.Caption := FormatCurr('$###,##0.00',QRExpr1.Value.dblResult * 1);
The printed result is $234,345.68
 
The other report prints QRExpr1 directly using a format mask set as follows:
    '$'###,##0.00
The printed result is $234,345.67
 
There is a good reason for the value of QRExpr1 to be assigned to a Label.
 
Can anyone explain why this is happening and how to fix it?
 
TIA
 
Mark

Reply via email to