Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ID number from 123-45-1234 to XXX-XX-1234

Status
Not open for further replies.

Yustrn

Instructor
Jun 19, 2002
42
US
I'm using Crystal 7 and on one of my reports it list the employee's ID or SSN, would like it to "X" out the first 5 numbers, and just leave the last 4, anyone know how to do this, or maybe just show the last 4 numbers only?
 
You might be able to concatenate your field with the mask. For instance:

If your string field contains the following ...
{TABLE.SSN} = 338-54-7458

... you could build formula {@SSN} that says ...
"XXX-XX-"+Right({TABLE.SSN},4}

... which should output the following string
XXX-XX-7458

Not sure if this is the most efficient, but it's the first idea that comes to mind. Hope this helps!


jennifer.giemza@uwmf.wisc.edu
 
If the field isn't the same length as the SNN, than the above may not work:

"XXX-XX-"+mid({table.ssn},8)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top