Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formulas Post Reply Post New Topic
Author Message
gpmatthews
Newbie
Newbie
Avatar

Joined: 20 Aug 2009
Location: United Kingdom
Online Status: Offline
Posts: 9
Quote gpmatthews Replybullet Topic: Formulas
     Posted: 20 Aug 2009 at 2:02am
I am new to crystal reports 9 and am trying to turn a range of percentages in to grades, e.g. 0 to 30 as 'A' 30 to 60 as 'B' and 60 to 100 as 'C', how to i write this in a formula?
Regards
IP IP Logged
Jagaveera
Newbie
Newbie
Avatar

Joined: 11 Jun 2009
Location: India
Online Status: Offline
Posts: 18
Quote Jagaveera Replybullet Posted: 20 Aug 2009 at 5:49am
Use this formula
 
Select {tablename.fieldname}
Case 0 To_ 30 : "A"
Case 30 To_ 60 : "B"
Case 60 To_ 100 : "C"
 
 
In this formula a percentage value of 30 comes under B. modify the formula as per ur requirement.
IP IP Logged
gpmatthews
Newbie
Newbie
Avatar

Joined: 20 Aug 2009
Location: United Kingdom
Online Status: Offline
Posts: 9
Quote gpmatthews Replybullet Posted: 20 Aug 2009 at 6:01am
thanks for that, this is the formula that i have put in, but its only show the "A" grades on the report, what have i done wrong?

Select {@PERCENTAGE}
Case 0 To_ 5 : "A"
Case 5 To_ 20 : "B"
Case 20 To_ 30 : "C"
CASE 30 TO_ 40 : "D"
CASE 40 TO_ 100 : "E"
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