Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Conditional Suppress Post Reply Post New Topic
Author Message
Gymnast
Newbie
Newbie
Avatar

Joined: 26 Mar 2012
Location: United States
Online Status: Offline
Posts: 7
Quote Gymnast Replybullet Topic: Conditional Suppress
     Posted: 27 Mar 2012 at 6:57am
I would liek to suppress  a record if it meets certain criteria.
 
Here is the scernario:
Field Status contains the following values:  Pending, Completed, Cancelled.
MaxOrders is a function that (calculates) and displays the Total orders (regardless of their Status).  This value is displayed against each record.
 
Requirement:
 
I would like to display only the records where
1.  Status <> "Completed" and MaxOrders  > 0 and there are no records where Status = Completed.
 
2.  Status = Completed and MaxOrders > 0.
 
 
 
Here is my formula for Suppress for the field
 
if (({sp_MONTHLY_STATUS_BY_REP1.Status} <> "Completed" AND {@MaxOfTotalOrders} > 0
    AND ({sp_MONTHLY_STATUS_BY_REP1.Status} = "Completed" AND {@MaxOfTotalOrders} = 0))
 
    OR ({sp_MONTHLY_STATUS_BY_REP1.Status} = "Completed") AND {@MaxOfTotalOrders} > 0) then
false
 
 
But this still displays the records I would like suppressed. 
Your help is appreciated.


Edited by Gymnast - 27 Mar 2012 at 6:58am
IP IP Logged
Gymnast
Newbie
Newbie
Avatar

Joined: 26 Mar 2012
Location: United States
Online Status: Offline
Posts: 7
Quote Gymnast Replybullet Posted: 27 Mar 2012 at 9:06am
Solved!  Got the number of records and then passed the condition above.
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