Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Another CR formula IF question Post Reply Post New Topic
Author Message
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Topic: Another CR formula IF question
    Posted: 19 Apr 2010 at 3:57am
I was wondering what the correct logic would be for the following:

If "10" in (field.number) then
"Hello you have 10"
Also if "20" in (field.number) then
"Hello you have 20"
Also if etc.....

I don't want an else if statement because it only selects one thing. It is drawing from a multi-select statement where the person can choose all 5 or none at all, but I want it to show everything the person picks.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 19 Apr 2010 at 4:27am
I am not sure (never tried it),  I am assuming you have a parameter that allows multiple selections.  The selections would be in the form of an array.  You could (I think) create a for loop to display all the strings (i.e, build a string in the for loop).  I would use a switch statement in the for loop (I think it would execute faster than if statements).
 
Lots of luck.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.