cancel
Showing results for 
Search instead for 
Did you mean: 

Using Case statement instead of IF in formula fields

Former Member
0 Kudos

Hi,

Can I use Case statement instead of IF in formula fields?If yes,please specify the syntax.

regards,

sunitha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sunitha,

You can surely use case statement instead of the If statement. The syntax for the case statement is :

Select [1 To n]

Case "Condition a", "Condition b":

"c"

Case "Condition d","Condition e":

"f"

Default:

" ";

Hope this helps you!

Regards,

Anindita

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sunitha,

You can go through this simple case statement

Select RecordNumber

Case 1: "This is First Record"

Case 2: "This is Second Record"

Case 3: "This is Third Record"

Case 4: "This is fourth Record"

Default:"There is no Records"

Thanks,

Sastry

Former Member
0 Kudos

Hi Sunitha

Yes you can use the Select Case statement instead of if then else.

Please open Crystal Reports help and search for the keyword case and you would get the syntax for select case statement.

Hope this helps!!

Regards

Sourashree