Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Masking 5 digits in SSN #'s Post Reply Post New Topic
Author Message
brufam
Newbie
Newbie


Joined: 07 Apr 2008
Location: United States
Online Status: Offline
Posts: 5
Quote brufam Replybullet Topic: Masking 5 digits in SSN #'s
     Posted: 02 Jul 2008 at 11:55am
How can I mask the first five digits in ssn's #?  I have tried a couple of formula's, someone told me to use the trim function, but isn't that to remove spaces?
Thanks for your help,
LisaConfused


Edited by brufam - 02 Jul 2008 at 11:56am
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 03 Jul 2008 at 1:45am
Hi Lisa,
 
Try using Mid and Replace combination,it would go like this
 
Create a 5 different formulas for Mid function replace the
'12345-6789000' with your table field...
 
tonumber(mid('12345-6789000',1,1))
tonumber(mid('12345-6789000',2,1))
tonumber(mid('12345-6789000',3,1))
tonumber(mid('12345-6789000',4,1))
tonumber(mid('12345-6789000',5,1))
 
Then create the following single replace formula  replacedigits
 
 
this will convert the first five digits in to # then you can create text object and place the replacedigits formula along with the remaining digits
 
Cheers
Rahul
 
 


Edited by rahulwalawalkar - 03 Jul 2008 at 1:46am
IP IP Logged
brufam
Newbie
Newbie


Joined: 07 Apr 2008
Location: United States
Online Status: Offline
Posts: 5
Quote brufam Replybullet Posted: 03 Jul 2008 at 8:28am

Thank you so very much! Tongue

IP IP Logged
Cordellv
Newbie
Newbie
Avatar

Joined: 14 Jan 2009
Location: United States
Online Status: Offline
Posts: 35
Quote Cordellv Replybullet Posted: 23 Jun 2011 at 1:48pm
 
 Try this formula.  It works quit well:
 
Right ({ssField},4)
 
Cvail
WSIPC
 


Edited by Cordellv - 23 Jun 2011 at 1:50pm
Making Things Better One Day At A time
IP IP Logged
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Posted: 27 Jun 2011 at 10:30am
I've done it like this. Works well.
 
totext ("XXX-XX-" & right({ssn_field},4))
Newbie reports
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum