Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Multiple If statements Post Reply Post New Topic
Author Message
swingking03
Newbie
Newbie


Joined: 13 Apr 2012
Online Status: Offline
Posts: 8
Quote swingking03 Replybullet Topic: Multiple If statements
     Posted: 18 Apr 2012 at 5:48am
I am trying to create formula along the lines of:
 
If field = A then 5000
if field = B then 7500
if field = c then 10000
 
and it goes on for 10-15 entries.
 
I keep getting errors such "the remaining text does not appear to be part of the formula" or "a boolean is required here."
 
How can I string multiple If statements together in one formula?
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 18 Apr 2012 at 5:54am
try something like:

if field = A then 5000
else if field =B then 7500
else if field =C then 10000
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 18 Apr 2012 at 5:55am
If field = A then 5000 else
if field = B then 7500 else
if field = c then 10000 else .....
 
IP IP Logged
swingking03
Newbie
Newbie


Joined: 13 Apr 2012
Online Status: Offline
Posts: 8
Quote swingking03 Replybullet Posted: 18 Apr 2012 at 6:04am
Thanks so much to both of you, your solutions worked perfect.
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