Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Conditional not working Post Reply Post New Topic
Author Message
ddepiano
Newbie
Newbie


Joined: 28 Sep 2010
Location: United States
Online Status: Offline
Posts: 2
Quote ddepiano Replybullet Topic: Conditional not working
     Posted: 09 Nov 2010 at 7:30am
I am using a text file as a data source in Crystal version XI.  I have two conditions I am checking.  If either is true, I want to supress the entire row as it contains spaces or bogus data. 
 
If I run these INDEPENDENT, they each do what they are supposed to.  However, when using the OR statement, only the first condition appears to be evaluated.  Here is what I have:
 
trim(left({rpt54wdhwide_txt.ACCOUNT},1))="*" or ({@CPAMT}=0 and {@CPVARPT}=9999999)
 
This should be checking that the first character in the ACCOUNT is a star or checking that the current period amount=0 while the variance percentage is 9999999 (a bogus number I made up). 
 
I don't understand why it isn't working.  Help?
 


Edited by ddepiano - 09 Nov 2010 at 7:56am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Nov 2010 at 8:00am
do you have NULLs?
If you do not tell crystal to handle Nulls and the first field youa re evaluating (ACCOUNT) is null the formula stops working.
In formula editor you can flip the null option to use 'Default values for Nulls'
IP IP Logged
ddepiano
Newbie
Newbie


Joined: 28 Sep 2010
Location: United States
Online Status: Offline
Posts: 2
Quote ddepiano Replybullet Posted: 09 Nov 2010 at 8:40am
Worked like a charm.  Thanks.
D. DePiano
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