Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Supress when grouping Post Reply Post New Topic
Author Message
jombi30
Newbie
Newbie
Avatar

Joined: 17 Jun 2008
Location: United States
Online Status: Offline
Posts: 3
Quote jombi30 Replybullet Topic: Supress when grouping
     Posted: 17 Jun 2008 at 6:45am
Hi, Im new in this forum, anyway my problem is: lets say im grouping some products by vendors and I want to supress some products by any criteria I want to, but if the first row of any vendor group match to the supress criteria, it supress the group header but still i have for example two more rows, in this case products that shows up with the same vendor but my vendor header goes away because of my first row. any help, i will appreciate it. 
Jose Bisono
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 17 Jun 2008 at 3:06pm
how are you doing the Suppress now? You should have the same formula in both the Suppress properties for the Group Header as well as the Details section. Sounds like you have it in the Header, but not the Details section. Posting your formula and where it is located will be helpful.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jombi30
Newbie
Newbie
Avatar

Joined: 17 Jun 2008
Location: United States
Online Status: Offline
Posts: 3
Quote jombi30 Replybullet Posted: 18 Jun 2008 at 9:40am
Thanks for your respond, yes Im using the same formula to supress in details section and group header the formula is like this:
  if Month({Command.LN_desired_recv_date}) > 3 or year({Command.LN_desired_recv_date}) <> CCur({?Year}) then
            true
        else IF NOT ISNULL({Command.LN_desired_recv_date}) AND NOT ISNULL({Command.ACTUAL_RECV_DATE}) and {Command.LN_desired_recv_date} <= CurrentDate and Month({Command.LN_desired_recv_date}) <=3 and Year({Command.LN_desired_recv_date}) = CCur({?Year}) THEN
            {Command.ACTUAL_RECV_DATE} <= {Command.LN_desired_recv_date} 
        ELSE IF NOT ISNULL({Command.LN_desired_recv_date}) AND ISNULL({Command.ACTUAL_RECV_DATE}) and {Command.LN_desired_recv_date} <= CurrentDate and Month({Command.LN_desired_recv_date}) <=3 and Year({Command.LN_desired_recv_date}) = CCur({?Year}) THEN
            Month ({Command.LN_desired_recv_date}) > 3 and Year({Command.LN_desired_recv_date}) = CCur ({?Year})
        ELSE IF ISNULL({Command.LN_desired_recv_date}) AND NOT ISNULL({Command.ACTUAL_RECV_DATE}) THEN
            {Command.ACTUAL_RECV_DATE} <= {Command.LN_desired_recv_date}
        ELSE IF NOT ISNULL({Command.LN_desired_recv_date}) AND ({Command.LN_desired_recv_date} > CurrentDate or Month({Command.LN_desired_recv_date}) > 3)then
            true
i have a select case 1: because this is by quarter, quarter 1 = January, February and March
Jose Bisono
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 18 Jun 2008 at 9:57am
I think I understand now. So the first row will match the criteria and the header gets suppressed. But the next two rows don't match the criteria and the Detail rows get shown. I think what you're trying to do is, "If the first row matches the criteria, then suppress every row in this group no matter what". Is that true?

If this is a correct assumption, then I would set a global variable and use your current formula to set it to true or false. Then in the Details Section, just return this variable in the Suppress formula. That way, the first record will set the boolean variable and all the Detail records will be suppressed if the first record returns true.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jombi30
Newbie
Newbie
Avatar

Joined: 17 Jun 2008
Location: United States
Online Status: Offline
Posts: 3
Quote jombi30 Replybullet Posted: 18 Jun 2008 at 12:15pm
well not really, i would say all the rows has to match the criteria in order to supress the group header thats the point, thanks again.
Jose Bisono
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