Link to home
Start Free TrialLog in
Avatar of YVF
YVFFlag for United States of America

asked on

How can I suppress blank group?

I have a group of item type. Under that group, I have the list of items. However, if the item has quality is bad, I suppressed it. Now, the scenario is ITEM TYPE 1 has 2 items which are ITEM 1, ITEM 2 and both of them are bad. Therefore, they are all suppressed and now ITEM TYPE 1 is empty. I want to suppress that ITEM TYPE 1 because it is blank now. I tried to count the number of items in ITEM TYPE but it returns 2 instead of 0 which I expected. Any solution for this?
Avatar of kingjely
kingjely
Flag of Australia image


Hi,

If you want to suppress blank Group>
go to section expert> choose the group section to suppress and 'tick' suppress blank section


ASKER CERTIFIED SOLUTION
Avatar of kingjely
kingjely
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of YVF

ASKER

I tried it before posting question but it doesn't work. I think the reason is that group is not blank because it have items which are bad quality. And I just hide that bad quality items.

Instead of hide, can you suppress them if there bad ?

Then suppress the group section? or have you tried that too>

If not want to post a sample, save data with report, and will have a look.. try above first though if you haven't already
Avatar of Mike McCracken
Mike McCracken

Do you need the data for the report?
If not then just change the filter/selection to not select those records.

mlmcc
One way to do this is to create a formula

If {YourQualityField} = "GOOD" then
    1
Else
    0

YOu can then suppress the group with a formula like
Sum({@GoodQuality},{GroupFIeld}) = 0

mlmcc
Avatar of YVF

ASKER

Hi mlmcc,

I think I can use your second method. However, I got a error say that the field cannot summarized. The reason is I have a Sum() in if clause condition.

Then in suppress formula of the group, I do sum to get all the number of suppressed items to do compare with "COUNT(Item)" and it complained that error.
If ({@Quantity} = 0) AND (Sum ({<ReportName>.Order}, {<ReportName>.ItemCode}) = 0) Then
1
Else
0

Open in new window

In that case you probably can't do it since the headers are done before the details can calculate.

mlmcc
Avatar of YVF

ASKER

So, is there any solution or not?
You can always calculate it using a formula or a running total and then use it iin the group footer.  The only way to get it in the group header would be in a subreport.

mlmcc