Link to home
Start Free TrialLog in
Avatar of erp1022
erp1022Flag for United States of America

asked on

SSRS hiding groups conditionally

Hello,

I would like to hide the group header if there are no detail rows associated with it. I have tried various things, filters, conditionally hiding the row, etc. but nothing seems to be working.

Any ideas?

Thanks.
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

it depends on what you are grouping by. The wholereport is suppose to be based on the group of what you want and of the report.
If there is no group data then there should be no report.
Avatar of erp1022

ASKER

What do you mean "it depends on what you are grouping by"? I am grouping on a particular field in my dataset. I think you may have misunderstood my question. I want to see all transactions for a particular customer and am gouping by customer. If there are no transactions for that particular customer, it is still showing a line with the customer name.

So, as I stated in my original question: how to hide a group header if there are no detail rows for that group?
Then you need something like this on the header row, hide visiblty properties box..
=IF Trim(Fields!customer.name=""), True, False)
That is good for  whole customer, But for no data you would need to check a field that you have in your detail that could have no data..
=IF Trim(Fields!Product.name=""), True, False)
Avatar of erp1022

ASKER

Your solution is not working. I put an expression on my header row visibility:

=iif(Trim(Fields!SalesNumber.Value =""), True, False)  

Fields!SalesNumber.Value is a field from my detail line. It is still showing the blank lines with customer name when there is no detail.

Does anyone else know how to do this?
I was thinking that you may have to do the same expression in the header and the detail row.
=iif(Trim(Fields!SalesNumber.Value =""), True, False)
ASKER CERTIFIED SOLUTION
Avatar of erp1022
erp1022
Flag of United States of America 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
Let me see if I understand the problem.  The report groups by customer.  Your data set returns all customers even if they havent made a purchase. You want to filter out customers in your table who have not made a purchase?  If so add a filter to the table to say sum(purchases) > 0.  Then those customers without a purchase will be excluded from the report and you wont have any group headers without any data.

Avatar of erp1022

ASKER

No one with knowledge of how to fix this issue responded to my post.