Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove comma from crystal report string and from integer field

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?

like image 433
Rahul Avatar asked Nov 20 '12 11:11

Rahul


People also ask

How do I convert a string to a number in Crystal Reports?

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.

How do I change the field format in Crystal Reports?

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.

How do you round off numbers in Crystal Report?

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.


1 Answers

Try below code,

Replace (ToText ({Tablename.Year_Field}, 0),"," ,"" )
like image 129
user3404872 Avatar answered Oct 13 '22 13:10

user3404872