Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding Error - Precision as Displayed 1

Status
Not open for further replies.
Dec 27, 2002
167
US
I have a report that gives be a total by group, then grand total. If you manually add every group their sub-totals are accurate.

If you add all the groups subtotals they are 1 cent off the grand total. Not a big deal, but I would like to correct if possible.

Is their a function similar to Excels Precision as Displayed that will help me corrct this?

Thanks
 
Hi are u using a rounding function?
if so change the rounding to 3 decimal.


cheers

pgtek
 
pgtek...rounding like that won't help.

The "display" rounding does not in fact do anything for the math...it is just for show.

I would do it this way.

I would round each individual value to the correct number of decimal places...

Let us say you have

1.234 rounded to two decimals 1.23
2.454 2.45
3.234 3.23
----- ----
6.921 rounded 6.92 6.91

doing it with rounded values...makes the math look correct...perception is worth everything in report math.

If you did it the first way with a "display round" then it would look incorrect.

So I would use a formula on each individual value rounding them appropriately

//@roundValue

WhilePrintingRecords;

Round({table.value},2);

That should do it

Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top