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

How to remove Zeros after decimal

Status
Not open for further replies.

teddysnow12

Programmer
Aug 12, 2011
30
US
Hi,

I have numbers like 11.00 , 13.00

I need to remove the zeros and want the numbers look like 11 , 13.

I want help in writing the formula for this in crystal reports 2008.


Thanks!
 
It is a formatting issue. Right click on the field and click on menu "Format field ..." - you will find formatting options in tab "Number". If you want to riund the number use button "Customize ..."

Viewer, scheduler and manager for Crystal reports.
Send you report everywhere.
 
If these are really numbers, you can just right click on the field->format field->number->choose "-1134". If these are strings, you can convert them to numbers and then format as just described, by using a formula like this:

tonumber({table.string})

If you want to reference the field as a string, e.g., within a formula, you could also do:

totext(tonumber({table.string}),0,"")

Or, if it is a number, use:

totext({table.number},0,"")

-LB
 
I've also used another method with numbers referenced in a string formula...

split({table.string},".")[1]


jcrawford



Not in word only, but in deed also... 1Jn3:18
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top