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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RIGHT Function 2

Status
Not open for further replies.

Jewel142

ISP
Jun 17, 2009
39
Hi -

I'm trying to shorten up a Social Security Number field on a report so that the field only returns the last 5 digits (including the - ) of the SSN. I've entered the following formula but nothing returns and I don't get an error when I save and close. I'm entering it using the SQL Express Fields in Crystal 2008:

{fn RIGHT("EMPLOYEE"."FICA_NBR",6)}

Any suggestions? Thanks!

Jewel142
 
That looks correct to me. What happens if you create it as a formula instead of a SQL expression?

right({EMPLOYEE.FICA_NBR},6)

-LB
 
That worked - thank you.

Is there rhyme or reason as to when to use sql expressions vs. formulas? I’ve just switched over to Crystal Reporting from Access so this is a whole new world for me.

Thanks again!
 
The SQL expression should have worked, too. Did you place it in the detail section? If you placed it in the report header section, maybe you encountered a null first record and thought it wasn't working.

-LB
 
It was in the detail section of my form so I'm not sure why it didn't work.

J~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top