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

converting Number To Text = adds 2 extra decimal places 1

Status
Not open for further replies.

Halfcan

Technical User
Dec 8, 2002
214
US
hi,
THIS SHOULD BE SIMPLE.
I have a number in my database with 0 decimal places.
EXAMPLEs: 1, 2, 3,

In Crystal:
{DeviceList.# of Offnet Runs} (number) Output: 1, 2, 3...
(NO DECIMal places)

Situation:
If the field is empty, I want "na" to be displayed.

Heres my formula:
if isnull({DeviceList.# of Offnet Runs}) then "na"
else ToText ({DeviceList.# of Offnet Runs})

the result of this formula when it's returning a number is 3.00 , but it should be just 3

Anyone know how to remove the .00 ?

THanks,
HC
 
Try:

if isnull({DeviceList.# of Offnet Runs}) then "na"
else ToText ({DeviceList.# of Offnet Runs},0,"")

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top