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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula Multiplication shows wrong results

Status
Not open for further replies.

maas

Programmer
Sep 3, 2009
148
BH
Hello All,

I am having 2 fields in the group footer:

{@Rate} and {@Balance}
895,449.00 * 0.00436 The result formula is showing 3,904.06237 where it is actually 3904.15764.
The result formula is only having {@Rate}*{@Balance}and I am not using any rounding!

Can you please help. It is a strange issue

Thanks


 
Place the {@Rate} and {@Balance} in group footer and make sure you really are getting the correct values ate that point.

Ian
 
What are you actually doing? Are you definintely using the figures you cite, or just assuming you get them? It's quite easy to make such errors, whereas I've never before come across Crystal making an error in arithmetic.

It could be something about rounding, you can sometimes get rounding without realising that you asked for it. Try displaying more of the raw data.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Your {@Balance} is probably displayed as .00436 but is really .00435989....etc. If you want it the amount to reflect the display, then change {@balance} to:

round({@Balance},5)

Of course, it might be the other formula, or both, that need to be rounded.

Or, if you don't want rounding, then accept the result as displayed, understanding that you are seeing a rounded display value that doesn't exactly match the actual underlying value.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top