Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Ranges in a formula? Post Reply Post New Topic
Author Message
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Topic: Ranges in a formula?
     Posted: 23 Nov 2011 at 4:52am
I have in my database numbers

10
20
30
40 up to 300.
I want to do this....

if (database.myfield) is between 10 and 30 then "Great"
else if (database.myfield) is between 40 and 100 then "Good"
else if (database.myfield) is between 110 and 200 then "Fair"
else if (database.myfield) = 210 then "Bad"
else if (database.myfield) = 220 then "Terrible"
etc

How can I do this in a CR formula?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Nov 2011 at 5:00am
if {table.field} in [10] to [30] then "great"
else...
 
 check CR help for range or in range
 
IP IP Logged
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