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!

varying decimel point

Status
Not open for further replies.

djabra31498

Programmer
Feb 24, 2004
7
US
How do I get it to display 10.2 when the value is 10.2, but display 10 when the value is 10
 
This is Crystal version dependent:

Right click the field and select format field->Number tab->Customize->X 2 next to Decimals and use:

if val(right(totext({Orders.Order Amount},2,""),2)) = 0
then
0
else
if val(right(totext({Orders.Order Amount},2,""),1)) = 0
then
1
else
2

There's probably a more elegant means, but this will work.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top