Skip to Content
0
Former Member
Dec 11, 2013 at 03:08 PM

Display String formula to remove commas and decimals

3753 Views

I am using Crystal Reports for .Net (Visual Studio 2010).

In the Display String formula, I need to strip all commas and decimals. I have tried to use:

If Not IsNull({table.field}) Then

ToText({table.field}, 0, "")

but the ToText function gives error "Too many arguments passed".

Many posts on the internet suggest trying to use a combination of Replace with the CStr function like the following:

If Not IsNull({table.field}, 0, "") Then

replace(cstr({table.field},0),',','')

but the cstr function is returning error "Too many arguments passed".

Anyone have a working function that will remove commas and decimals from a string?

Thanks...