Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: If then else statement Post Reply Post New Topic
Author Message
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Topic: If then else statement
     Posted: 19 Jun 2013 at 5:32am
I am trying to creat an if then else state statement, but Im not sure how to properly format it.
 
 
if {Table1.Field1} = "X" then "Y"
if isnull{Table2.Field2} then "Y"
else
{Table3.Field3}
 
 
How would I arrange that?
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 19 Jun 2013 at 6:27am
Hi

Try this :

if {Table1.Field1} ="X" and isnull({Table2.Field2}) then "Y"
else {Table3.Field3}

or

if {Table1.Field1} ="X" or isnull({Table2.Field2}) then "Y"
else {Table3.Field3}

Edited by Sastry - 19 Jun 2013 at 6:28am
Thanks,
Sastry
IP IP Logged
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Posted: 19 Jun 2013 at 6:38am
Thank you.  That got it. 
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