Nello
 
Now I WAS looking for something that would force Delphi/QR to handle its format mask consistently, because putting something like your suggestion into a serious number of reports was a bit daunting.
 
But I have now realised that if I put your adjustment (but rounding down) into the small number of the reports that were rounding up, the problem is fixed.
 
So, thanks again!
 
Mark
----- Original Message -----
Sent: Tuesday, April 24, 2001 1:43 AM
Subject: Re: [DUG]: Currency Formats

Mark
 
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.
 
LOL - i suppose being "consistent" by printing the wrong thing in both places isn't quite satisfactory
 
I think the following will work assuming the value of the expression is always >= 0
 
if "x" is the QR expression you have now - change it to:
 
int( ( x*100 +0.5)) / 100
 
(and put back the label the way you had it <g>
 
 
if x can be < 0 then you'll need to fix this up to test the sign of x and either add or subtracts the .5
 
something like
 
int( ( x*100 + if(x<0,-0.5,0.5))) / 100
 
I haven't actually checked these so caveat emptor.   Hope I haven't done something stupid.
 
-ns

Reply via email to