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

Display String formula to remove commas and decimals


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


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?