Author |
Message |
jprucha
Newbie
Joined: 18 Jul 2007
Location: United States
Online Status: Offline
Posts: 2
|
Topic: Suppress Group Header when no details Posted: 18 Jul 2007 at 7:48am |
Hi All,
I need a way to suppress a group header when all of the details in that group are suppressed.
I have two details sections in the group and I am conditionally suppressing them based on some calculations on fields in the details section. It would be simple but there are multiple details as the details represent a specific quarter in time and I'm doing all quarters (financial reports). So basically I know that I am suppressing a specific details section but is there a way to keep track if I have all details sections (quarters) suppressed which means I don't want to show this groups group header? Also, I want the report to work not knowing how many quarters there are to be reported. So I could be doing 20 quarters or 2 quarters and I need to suppress the group if all 20 or all 2 quarters are suppressed.
Thanks,
Edited by jprucha - 18 Jul 2007 at 9:20am
|
Jim
|
IP Logged |
|
rnareshk
Newbie
Joined: 19 Jul 2007
Location: India
Online Status: Offline
Posts: 30
|
Posted: 19 Jul 2007 at 5:17am |
use a same suppressed condition that is used for suppressing the fields of details section, for group header suppress condition.
|
Thank You,
Naresh.
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 19 Jul 2007 at 11:40am |
In the group header, I would copy all those conditional formulas into one big formula and disable the header. This way, if all conditions are true (meaning every details section will be surpressed), then the header gets suppressed as well.
As an optional step, you could also put each condition into its own formula that returns True or False. Then you can call the appropriate formula from the section. This keeps you from duplicating code in the sections and group header.
|
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 Logged |
|
jprucha
Newbie
Joined: 18 Jul 2007
Location: United States
Online Status: Offline
Posts: 2
|
Posted: 19 Jul 2007 at 12:04pm |
Hi Brian,
We are on the same track as I do have all 5 (there are five conditions) in my details section in their own formula and that is how I suppress the details section for a specific period.
The problem I am experiencing is my group, which is a set of 70 banks, and the group has just 1 detail section. Each detail section represents a financial quarter. And I'm showing all quarters so I have an X number of quarters/details sections. I am keeping track of whether to show the details section like you have said and that is working fine. Only problem is the Group header shows.
If I have 20 periods, how can I keep track of the possibility of all details sections/periods being suppressed for each group.
Is there a way to test all details sections to see if they are suppressed? Might be kind of hard since I don't know the exact number of periods that will show and it will increase as time goes by. I tried keeping a global counter so that if I didn't suppress a details section that I add to the counter. But I must not have increased the counter correctly as it never incremented. I was hoping that at the end of processing that I could check to see if I had a zero for the number I didn't suppress and then I could not show the group header.
Any thoughts?
Jim
|
Jim
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 19 Jul 2007 at 12:13pm |
Yeah, this is tough one. I would try to build a SQL statement which summarizes the quarters used and have it return a SINGLE record with a field for the data you need. Then you can call the stored procedure (or Command object) from your report and reference each field (type of Boolean?) in the header section. A bit tricky, but if you can figure out how to build that SQL statement then it should work.
|
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 Logged |
|
bond_003
Newbie
Joined: 17 Jul 2009
Location: United States
Online Status: Offline
Posts: 4
|
Posted: 17 Jul 2009 at 6:41am |
am new to crystal reports, please guide me how do i hide group header, page header when no details are present.
Thanks.
RP
|
IP Logged |
|
vike
Newbie
Joined: 14 Oct 2009
Location: United States
Online Status: Offline
Posts: 1
|
Posted: 14 Oct 2009 at 5:19pm |
were you able to solve this? I am running into same isuue and can't find a solution.
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 15 Oct 2009 at 7:23am |
NOt sure how you have your report set up but here is a possible solution.
Create a formula field to run through your suppressing options and make a 1 or 0... (0 =suppressed and 1 = not suppressed)
if SuppressionCriteria_A_met or SuppressionCriteria_B_met or SuppressionCriteria_C_met then 0 else 1
Now you can sum this formula field at group level and use that SUM for your conditionally grioup header suppression
|
IP Logged |
|
Racer3822
Newbie
Joined: 12 Nov 2010
Online Status: Offline
Posts: 1
|
Posted: 12 Nov 2010 at 9:22am |
This solution worked very well for a very similar problem I was having with details displaying. Thank you!
Originally posted by DBlankNOt sure how you have your report set up but here is a possible solution.
Create a formula field to run through your suppressing options and make a 1 or 0... (0 =suppressed and 1 = not suppressed)
if SuppressionCriteria_A_met or SuppressionCriteria_B_met or SuppressionCriteria_C_met then 0 else 1
Now you can sum this formula field at group level and use that SUM for your conditionally grioup header suppression
|
IP Logged |
|
flower
Newbie
Joined: 18 Jun 2012
Online Status: Offline
Posts: 12
|
Posted: 02 Jul 2012 at 10:56am |
Thank you for this answer. It worked !!!!!!!!!!
|
IP Logged |
|
|