Crystal Reports Suppression Criteria

Hi there,

I have what I thought was simple suppression criteria for my group but it's not returning the results I need, ;

if {?Days Over Due} = "All Pledges" then FALSE

//less than thirty days overdue but not negative or 0    *this returns negatives as well as values over 29
else if {?Days Over Due} = "Less than 30"
then ({@Days Overdue} <=0
and {@Days Overdue} >29)

//inclusive of 30 and 90 excluding less than 30 and greater than 90 *this returns similar results
else if {?Days Over Due} = "Between 30 and 90"
then ({@Days Overdue} <30
and {@Days Overdue} >90)

//inclusive of all over 90
else if {?Days Over Due} = "Greater than 90"
then {@Days Overdue} <=90

Any help would be appreciated!

Thank you - CS
rporter45Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Raghavendra HullurSoftware DeveloperCommented:
Hi,
Suppression condition result should be a Boolean value. First 3 conditions always results in false as 2nd and 3rd are:

else if {?Days Over Due} = "Less than 30"
then ({@Days Overdue} <=0
and {@Days Overdue} >29)
  --> this will always be false since Days Overdue will be a single value and you are trying to check for 2 values using and conditions

//inclusive of 30 and 90 excluding less than 30 and greater than 90 *this returns similar results
else if {?Days Over Due} = "Between 30 and 90"
then ({@Days Overdue} <30
and {@Days Overdue} >90)
--> here also same as above.

The 4th condition also looks contradictory.

Can you provide the details of exactly the 4 conditions and whether the report section needs to be suppressed or displayed for those? conditions?
0
Raghavendra HullurSoftware DeveloperCommented:
If feasible, provide report with some saved data and information of suppress conditions
0
mlmccCommented:
The ANDs should be ORs.

The Days Overdue cannot be both Less than 30 and greater than 90

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James0628Commented:
I think mlmcc nailed it and your ANDs should be ORs.

 FWIW, assuming that those are the only possible values for {@Days Overdue}, I would probably write your tests as:

not ({?Days Over Due} = "All Pledges" or
//less than thirty days overdue but not negative or 0
({?Days Over Due} = "Less than 30" and {@Days Overdue} in 0 _to 29) or
//inclusive of 30 and 90 excluding less than 30 and greater than 90
({?Days Over Due} = "Between 30 and 90" and {@Days Overdue} in 30 to 90) or
//inclusive of all over 90
({?Days Over Due} = "Greater than 90" and {@Days Overdue} > 90))

Open in new window


 That's untested, of course, but I think I got the conditions right.

 I find it easier to follow the logic by writing the condition for the items that you want to see, and then using Not to reverse that for the suppression.

 The "_to" in "{@Days Overdue} in 0 _to 29" says to exclude the lower end of the range (0 in this case).  So, assuming whole numbers, 0 _to 29 is the same as 1 to 29.

 James
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.