2
votes

I have report developed in SSRS 2005. It is a simple and straight-forward report using a stored procedure to fetch the data and display. This report has 100 columns and there are no grouping or subreports etc.

But user has option to select/deselect the column names to show/hide on the report. When the user select to hide couple of columns report is giving me blank/white gaps when exported to pdf or any other formats.

Is there any solution to this?

3
Can you clarify how you are hiding the columns? Via parameters?Cam L
Hi Cam, I select a particular column header, and in the properties for visible I write expression as "=iif(parameter!name1.value = 1, True, False)". When you preview in the RS the column is hidden if parameter!name1.value=1 but when I export the report to pdf I see the blank space.desi
Hi desi, I am not of much help this time. I think Frank got it.Cam L

3 Answers

3
votes

You need to ensure that you are hiding the row or the column of the table and not simply the fields. Check HarlingtonTheWizard's post at the following link:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=109566

Once the rows/columns are hidden, the height/width will collapse.

0
votes

I do not consider this as the best solution but is more of a hack but this is what I did in my situation.

1)Place a white rectangle in the desired cell. Make sure that the rectangle is white and has no borders. 2)Place the textbox inside the rectangle. Set an expression to hide and show this textbox. 3)Repeat for each cell in that column.

Therefore, when the textbox is shown it will look as normal. When the the textbox is hidden, the white rectangle will work as a "placeholder" to occupy the cell.

0
votes

You can try setting Report property containerwhitespace="True".