How can I remove the comma (,) from crystal report fields?
I have a field name "year" which is having a value of 2012
, but when I show that value in crystal report it includes a comma, becoming 2,012
.
How can I show only 2012
?
Answer: Use the toNumber() function to convert a string field to a number. When using the toNumber function, test the value first with the isNumeric() function. isNumeric() returns a value of TRUE only if the value in the string can be correctly converted to a number.
To set field default formatting, select File, Options from the menu bar and click the Fields tab. Field formats are set based on the field type you select.
The syntax is simply Round (x) , with x being the numeric or currency field to be rounded. Here are some examples of the Round function: Round(1.234) = 1. Round(1.4999) = 1.
Try below code,
Replace (ToText ({Tablename.Year_Field}, 0),"," ,"" )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With