Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: If Statements Post Reply Post New Topic
Author Message
rowcpa
Newbie
Newbie


Joined: 19 Jun 2007
Online Status: Offline
Posts: 10
Quote rowcpa Replybullet Topic: If Statements
     Posted: 25 Jul 2008 at 12:57pm
I have trouble getting "If" formulas to work when I have multiple criteria.  For example here is a functioning formula I have in a report:
 
if{Crystal_Report_First_Professional_Historical_Model.TUITION_DIVISION_DESCR}<>"None"
then{Crystal_Report_First_Professional_Historical_Model.TUITION_DIVISION_DESCR}
 
This formula inserts the Tuition Division Description field if the description field is not "None".
 
But I also want to just leave it blank if the field in question is not "Other".
 
My usual work around to a situation like this would be to write two formulas, dock them in the same section of the report and then suppress on a conditional basis so that only one or the other formulas will show at a given time.
 
That is not feasible in this case for a variety of reasons.  I just need to learn how to get an "Or" in the above formula so that both "None" or "Other" are left blank.
IP IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet Posted: 25 Jul 2008 at 1:01pm
I'm not sure if I understand the question correctly...Based on what I think you are asking try this

if{Crystal_Report_First_Professional_Historical_Model.TUITION_DIVISION_DESCR}<>"None"
then{Crystal_Report_First_Professional_Historical_Model.TUITION_DIVISION_DESCR}

else
if{Crystal_Report_First_Professional_Historical_Model.TUITION_DIVISION_DESCR}<>"Other"
then " "

Sarah
IP IP Logged
mirakhe
Newbie
Newbie


Joined: 15 Jul 2008
Online Status: Offline
Posts: 3
Quote mirakhe Replybullet Posted: 25 Jul 2008 at 1:10pm

I would have to agree.



Edited by mirakhe - 25 Jul 2008 at 1:11pm
IP IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet Posted: 25 Jul 2008 at 1:11pm
I thought a little more and the last entry likely isn't right.

if(({Crystal_Report_First_Professional_Historical_Model.TUITION_DIVISION_DESCR}<>"Other") AND ({Crystal_Report_First_Professional_Historical_Model.TUITION_DIVISION_DESCR}<>"None"))

then " "

else {Crystal_Report_First_Professional_Historical_Model.TUITION_DIVISION_DESCR}


Sarah
IP IP Logged
rowcpa
Newbie
Newbie


Joined: 19 Jun 2007
Online Status: Offline
Posts: 10
Quote rowcpa Replybullet Posted: 28 Jul 2008 at 5:26am
Thank you Sarah, your last reply worked perfectly.
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