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

Simple 'Select Case' question

Status
Not open for further replies.

bogjacket

Programmer
Jan 10, 2005
19
US
Hello everyone,

I have a field that needs to be viewed on the report in a standard way. For instance, the field might contain the strings "CitiMortgage", "CITIMORTGAGE, INC.", OR "CITI". I'd like to create another field that will represent any of these as just "CM", so I can use it for grouping.

I know all the possible variances that will be found in the original field, but I've just never used a Select statement in Crystal. So, I'm unfamiliar with the correct syntax.

I hope this makes sense, and thanks for your time.
 
Hi,
If this is for display and not filtering, you do not need a Select statement, just create a formula that translates the field's actual contents into what you want it to show instead:
Code:
If {field} startswith 'Citi' or {field} startswith 'CITI' then 
'CM'
Else 
{field}
You would need to include all the variants for each possible translation.( If they all start with citi ( in some form) you can use
Code:
If Upper({Field}) startswith 'CITI' 
 then 'CM'
 else {field}

as the only one you need..






[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top