views:

707

answers:

3

I have a table and an associated chart contained within a 'list' object in SSRS 2005. I am using an expression to determine the visibility of the table and chart, however when the table and chart are not visible an ugly large blank space (where they would otherwise have been rendered) appears in the report.

Is there any functionality to 'shrink' the list object if only some of the objects are rendered?

For example, I have a list with 3 items:

A
B
C

Item B does not meet the visibility criteria, so it's visibility is set to false. The outcome is:

A

C

But I want:

A
C

Any suggestions?

+1  A: 

Im not sure i completely understand the problem, but, why don't you filter the results rather than change their visibility?. I had similar problem, my solution was redo the report, i found that the visibility is quite problematic than useful.

Alan FL
OK, so I suppose I could write some logic to a textbox to be visible if there is no data stating "No data for..." then filter the table and chart in the list....Just seems messy.
ptutt
Another approach would be to filter the data from the data source, but it depends on the type of report you are trying to make. If the user doesn't need to interact with it, you can do it from the data source and save yourself the messiness of having to put filters in every object in your report.
Alan FL
A: 

To my knowledge List height automatically grows and shrinks based on the visibility of the controls in it. Make sure that you are setting the visibility to entire control if it is a table or chart.

A: 

Another solution would be to display your items within a table, and the table is placed inside the list.

  1. Place each of your itmes in one table row (table header).
  2. Set the visibility of your table rows according the visibility of your items.

If one item's visibility is set to "hidden", the whole table row will be hidden and won't be displayed at all.

Best regards

Mik