Crystal Report field formatting.

Posted by Laghaterohan under Regular Expressions on 9/8/2010 | Points: 10 | Views : 2212 | Status : [Member] | Replies : 1

I am having a Pincode field in my crystal report. The data in the same is retrived through database. The datatype in the database of the field Pincode is int.
However, when the data for pincode is displayed it is displayed as xxx,xxxx eg. 123,1234 . I dont want comma to appear. As there are no pincodes with comma in it.

How to remove the comma from the above?? Please help me out to solve my problem..

Thanks in advance,

Rohan Laghate.

Best Regards,
Rohan Laghate


Posted by: Alpesh on: 9/9/2010 [Member] Starter | Points: 25

First you make a one Formula field then copy below code and paste it in.

change the syntax 'Basic Syntax' instead of 'Crystal Syntax'

Dim x() As String
Dim i As Number
Dim arrsize As Number
Dim result As String

x = Split("111,2222",",")
arrsize = count(x)

For i = 1 To arrsize Step 1
result = result + x(i)
Next i

formula = result

Hope this will be useful. :)

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response