Hi,
in my reports the detail fields are displayed 'rounded'
up, but are adding in the total field as 'unrounded'
therefore giving a discrepancy between the detail and the totals.
ne ideas how 2 fix this prob?
This shouldn't be a problem. Each detail section is displaying the rounded value and the total is accurately totaling the values and display the rounded total.
You could display more decimal places in all text boxes or you could display inaccurate totals.
The only thing I can think of, is to use a query to output all your fields, except the value field. This is replaced by the expression "val:round([value],2)". This will round the value field to two decimal places. Therefore using this instead of the original data source will only give two decimal places and the values will agree to the total. Although as Duane has stated above, this will not give an accurate value, but it will make sense on the report.
I just wanted to let you know that your post was very helpful to me and took care of my problem which was very similar to the other persons problem. I can't tell you how thankful I am that I found your post.
Round does bander rounding. This will depend on the odd or even value of the last digit you want to see. If it is even, it will round down and if odd, it will round up. This is designed to attempt to make the final results more accurate.
Duane
MS Access MVP
Find out how to get great answers faq219-2884.
I am having a similiar problem as this. I need to round each line item in the report seperately and then sum the total. I need it to round correctly - not mostly correct. I am using access97. The "round" function doesn't seem to work for me at all. However if it doesn't round correctly (i.e. 0-4 down 5-9 up) it is useless to me. My report displays the invoice total on each line item. So times we charge on half cent rates (i.e. 51 boxes * $1.055 = $53.805) this is invoiced as $53.81. When you get 10-20 of these in a report and "=Sum([grossinvoice])them it's off by .10 -.15 which is unacceptable. Has anyone tried Jurgen's function and does it work? Any help would be appeciated.
Access 97 doesn't have the Round function in it and it wouldn't return what you want anyway. I'm not entirely sure this will do what you want because I haven't tested it on a lot of numbers but try this expression in some sample data.
myVal:Int((number + .0055)*100)/100
I'm probably missing something, but couldn't you use Paul's expression on the summed amount only?? In other words, add up the 3 decimal place items and only "round" the total.
COSMO,
To answer your question, if you had the folowing values;
$1.555
$1.555
$1.555
$1.555
$1.555
Would be $7.78 your way.
the same values rounded first (1.56) would return $7.80
In this small example it is only .02 but you can see how it would add up quickly if you have lots of invoices.
Thank you everyone for you help
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.