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
?
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
?
try this for formula
Try below code,
I'm just guessing but I believe you have embedded your field name into another object such as a text field.
If this is the case, double click your text box in the design view, then select your text field you are having issues with. Right click and select "Text Formatting", under the Font tab click the 'Format Formula Editor' button (the one with the X-2) to the right of the Font drop down menu. Now all you have to do is close the formula editor, then cancel the Text Format window. NOW when you right click on your year field again you will have a new option to Format the field which was previously grayed out.
Alternatively, you can remove your year field from any other object it is nested in. This will give you access to all formatting options.
In the crystal report designer view:
Right mouse click on that field, and select
Format object
. SelectCustom Style
in the Style list, and clickCustomize
. UntickThousands Separator
, and any other unwanted formatting.Failing that, you could try selecting the field and deleting the "," value from the property
ThousandSeperator
in your properties window.NumberVar cRed; ToText (cRed,"#")
OR
ToText({some numeric field value},"#")
The "#" has to be enclosed in parenthesis, single or double.