Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Special Characters Expand / Collapse
Author
Message
Posted Monday, March 18, 2013 3:18 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, May 8, 2014 10:30 PM
Points: 32, Visits: 113
HI All,

Can anyone help me in skipping the special characters in the Result set. column value
For ex.

If the actual value fetched from DB is 12AV$BJ_
When it displays in Report , i want the output as 12AVBJ

Is it possible. I want only textbox value to be changed. Not any other.

Textbox should accept only alphanumeric values.

Is there any option to set such validation

Thanks,
Post #1432115
Posted Tuesday, March 19, 2013 6:57 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: 2 days ago @ 6:50 AM
Points: 487, Visits: 1,229
You should be able to incorporate a Regex function to do this. Here is a sample:

•The Regex functions from the .NET Framework System.Text.RegularExpressions are useful for changing the format of existing strings, for example, formatting a telephone number. The following expression uses the Replace function to change the format of a ten-digit telephone number in a field from "nnn-nnn-nnnn" to "(nnn) nnn-nnnn":

=System.Text.RegularExpressions.Regex.Replace(Fields!Phone.Value, "(\d{3})[ -.]*(\d{3})[ -.]*(\d{4})", "($1) $2-$3")

I'm not a regular regex user, so I don't immediately know what your regex pattern would be, but you can go to a site like regexlib.com to get the pattern you need.



Post #1432619
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse