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

Formula help

Status
Not open for further replies.

JasonMcConnell

Technical User
Mar 10, 2005
29
GB
Hi,


When I add a simple calculation to a formula field in crystal 8.5 and also crystal XI it calculates the wrong result

e.g. 8/9 = 89 instead of 88

I suspect it a rounding problem but I can’t resolve this.

Can anybody help?
 
You can format the formula number field to show more decimal places 0.8888.
 
Thanks,

I have tried that but need the answer to 1 decimal place - 88

Any ideas
 
are you able to use TRUNCATE to 'lose' everything after the decimal value you want?

ie: If you have values:
{table.numbervalue1} = 8
and {table.numbervalue2} = 9


you can try:
truncate(({table.numbervalue1}/{table.numbervalue2}),2)

to change the # of decimal places to 1, change the '2' above to a '1'

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top