Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Tip for supression GH based on Suppresed Details Post Reply Post New Topic
Author Message
bspencer1
Newbie
Newbie


Joined: 26 Nov 2013
Online Status: Offline
Posts: 26
Quote bspencer1 Replybullet Topic: Tip for supression GH based on Suppresed Details
     Posted: 06 Jul 2015 at 6:50am
I am having trouble correctly suppressing a GH based on I choose to display in the details.  For illustration, the data set can be greatly simplified.  I have a Sales Order with three different versions:
 
SO 1234, Version 1
Created Date    Next Version Date
3/15/15             4/5/15
 
SO 1234, Version 2
Created Date    Next Version Date
4/5/15             5/12/15
 
SO 1234, Version 3
Created Date    Next Version Date
5/12/15             N/A
 
When the user runs the report, they pick the created date and I show them the version for the date they choose and the version with a Next Version Date of the same date.  So, if they user picked 3/15/15, they would see Version 1.  If they picked 4/5/15, they would see version 1 and version 2.  If they picked 5/12/15, they would see version 2 and version 3.  If they picked 2/1/15, given the above example, nothing would show up.
 
I have the details working just dandy using suppression, but I need to suppress the header and foot for the Sales Order group based on the rules of my details suppression as well.  I have tried a number of different tricks that get me close, but I always fall short.  Based on this example, how would you suppress the GH or GF?      
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Jul 2015 at 7:29am
1 - it appears you are grouping on the SO and Version together, correct?
2 - are the users just entering a date as the param or are they selecting from a dynamic list?
3 - are you you using a next() or Previous() to get your details to work?

Edited by DBlank - 06 Jul 2015 at 7:29am
IP IP Logged
bspencer1
Newbie
Newbie


Joined: 26 Nov 2013
Online Status: Offline
Posts: 26
Quote bspencer1 Replybullet Posted: 06 Jul 2015 at 7:49am

1. Yes and no.  The report groups by SO and then by Date (I called this Version in my description to simplify things).

2. The list is not dynamic.  The user picks the year and month (not an exact date or date range).
 
3. The formula for details suppression is as follows:
 
(TOTEXT({?Year}) + {?Month}) <> (TOTEXT({AXTerritorySales_query.Next Version Year}) + {AXTerritorySales_query.Next Version Month Name})
AND
(TOTEXT({?Year}) + {?Month}) <> (TOTEXT({AXTerritorySales_query.Created Date Year}) + {AXTerritorySales_query.Created Date Month Name})) 


Edited by bspencer1 - 06 Jul 2015 at 7:50am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Jul 2015 at 9:21am
is there a reason you are suppressing rather than just excluding via the select expert?
DATEDIFF('m',
DATE({AXTerritorySales_query.Next Version Month Name}+'/1'+{AXTerritorySales_query.Next Version Year}),
DATE({?Year},{?Month},1)
)=0
OR

DATEDIFF('m',
DATE({AXTerritorySales_query.Created Date Month Name}+'/1'+{AXTerritorySales_query.Created Date Year}),
DATE({?Year},{?Month},1)
)=0
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