SSRS 2008 Removing white space when hiding elements

reporting-servicesssrs-2008

I have been trying to resolve this simple issue for a few hours with no joy.

I have two tables within my SSRS 2008 report which are bound to different datasets and I need to show or hide the appropriate table based on a passed in parameter. This I have done with the hidden property of the table which works as expected. The problem I have is that when hiding the top item and showing the item beneath it I get the white space from the hidden item.

Trivial example

I created two tables and bound them to the same datasource laying them vertically.

enter image description here

I then set the hidden property of the top table to true and previewed the report.

enter image description here

You can see that the first grid is hidden but the white space remains. From my investigations I did see the ConsumeContainerWhitespace property used for this but in my case it did not clear up the white space.

Question

Is there a method of removing the white space for these hidden elements?

Best Answer

I would recommend two solutions depending on whether the datasets are the same.

1: If they share a common dataset then I would nestle them in another table that has 1 column, and 2 rows, and then change the row visibility depending on the parameters.

2: If the datasets are different, I would make each table a sub-report and then change the visibility that way.

Just another workaround caused by SSRS quirks!

Related Topic