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

Help with a formula

Status
Not open for further replies.

Holidayze

Technical User
Mar 8, 2007
2
CA
Hi, Im new to Crystal reports 10. I'm trying to create a formula that recognizes the USER ID and changes it to a text. This is what i have so far, and it works, the only problem is that I have about 80 numbers I have to do this for and I can only get one to work.

IF {ISS_MASTER.USERID} = "MF1234" then "HOLLY VINCENT"

this works but if I try to add another formula below it like
IF {ISS_MASTER.USERID} = "MF1234" then "HOLLY";
IF {ISS_MASTER.USERID} = "MF5678" then "ANNA"

the second formula will only show up in the report.
ahhhhhhhh

As I said, I'm very new to this so if you could provide me with any feedback it would be most appreciated

thanks

Holly
 
You will need a IF...THEN..ELSE

IF {ISS_MASTER.USERID} = "MF1234" THEN "HOLLY"
ELSE IF {ISS_MASTER.USERID} = "MF5678" then "ANNA"
ELSE IF .....
ELSE "UNKNOWN
 
Don't you have a lookup table for this? You could also use the following which might be a little simpler:

select {ISS_MASTER.USERID}
case "MF1234" : "Holly"
case "MF5678" : "Anna"
default : "Unknown"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top