Suppress Group Header
Suppress Group Header
(OP)
Report version 11
Database SQL Server within a MAS500 Enterprise application.
I need to suppress the group header based on the records in the detail section. Records in Details are conditionally suppressed when the level field does not equal 1 {tmfBOMWhereUsWrk.BoMtLevel}<>1. If no records are returned in Details, I need to suppress the group header.
Using the same expression, {tmfBOMWhereUsWrk.BoMtLevel}<>1, to conditionally suppress the group header doesn't work because it only considers the first record. I have also created a running total to count the records in the group where the level = 1, but this count is not accurate until we get to the group footer and therefore of no use to me in suppressing the group header. I can't use a standard summary expression, because I'm not able to add the condion to only summarize where level = 1. In the example below, I would like to have the group header information of 3008680-01 suppressed because there are no items with a level 1, hence no detail records are returned.
Any help would be appreciated.
Sample Data
Group by Component
Item Version Level
3008680
302255 A 1
400007 B 1
3013354 A 1
3008680-01
3008680-02
10000725 C 1
3019007 A 1
Thanks,
DLee
Database SQL Server within a MAS500 Enterprise application.
I need to suppress the group header based on the records in the detail section. Records in Details are conditionally suppressed when the level field does not equal 1 {tmfBOMWhereUsWrk.BoMtLevel}<>1. If no records are returned in Details, I need to suppress the group header.
Using the same expression, {tmfBOMWhereUsWrk.BoMtLevel}<>1, to conditionally suppress the group header doesn't work because it only considers the first record. I have also created a running total to count the records in the group where the level = 1, but this count is not accurate until we get to the group footer and therefore of no use to me in suppressing the group header. I can't use a standard summary expression, because I'm not able to add the condion to only summarize where level = 1. In the example below, I would like to have the group header information of 3008680-01 suppressed because there are no items with a level 1, hence no detail records are returned.
Any help would be appreciated.
Sample Data
Group by Component
Item Version Level
3008680
302255 A 1
400007 B 1
3013354 A 1
3008680-01
3008680-02
10000725 C 1
3019007 A 1
Thanks,
DLee

Talk To Other Members
RE: Suppress Group Header
One formula "test1" placed in group header:
Global booleanVar x = false;
Another one "test" placed in Details section:
Global booleanVar x;
if {tmfBOMWhereUsWrk.BoMtLevel} <> 1 then
x := true
else
x := x
Another formula "test2" placed in group footer that just displays the result of the formula from Details section.
{@test}
Then from Section Expert conditionally suppress the Group Header based on the result returned by this last formula.
{@test2} = true;
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
RE: Suppress Group Header
maximum({tmfBOMWhereUsWrk.BoMtLevel},{table.groupfield}) = 0
If there are only values of 1 or greater, you could use:
minimum({tmfBOMWhereUsWrk.BoMtLevel},{table.groupfield}) > 1
-LB
RE: Suppress Group Header
Thanks!
RE: Suppress Group Header
if {tmfBOMWhereUsWrk.BoMtLevel} = 1 then 1
Then use a suppression formula like this:
sum({@level1},{table.groupfield}) = 0
-LB
RE: Suppress Group Header
Patricia, I tried yours as well, unfortunately, it didn't work for me. Still, thanks for trying to help me!
DLee
RE: Suppress Group Header
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
RE: Suppress Group Header
Your idea works. I changed it to 'count' the number of records being displayed, and then if the value is 0 in the footer it will supress the header.
However, I had to add WhilePrintingRecords; in each formula.
Thanks for your insight on this.