Friday, March 23, 2012

Hidden columns/blank PDF page(s)

I have been trying for some time to create a columnar report where certain columns can be hidden as requested by the user. I have tried placing the complete column set in the report, and then hiding a subset of columns, but blank pages are produced when rendered to PDF since the report body does not appear to shrink as columns are hidden and justify themselves to the left. I have tried a table, list, and matrix to no avail...

Does anyone know of a workaround, a trick, or even a hack that may accomplish what I am after?

Thanks.

Oh well, guess there is no way to do it. I have seen many other posts of people trying to do the same thing. I wish someone from Microsoft would just say it's impossible so I could forget about trying to come up with a workaround... Doesn't seem like the functionality I am after is asking too much. Actually, I pretty much consider the PDF rendering the blank space to extra pages to be a rendering bug... Seems the renderer could be capable of clipping blank space... My 0.02 rant.|||I'm having the same issue so if anyone, especially someone from MSFT, has any ideas I'd be very eager to hear them.|||

Hello Iago,

I have found a work around for this problem. It’s a bit hacky, but does work.

1.Collapse all table columns to the smallest they can go so width = .125

2.Resize the DESIGN gird to the smallest it can go

3.Set the CanGrow property = FALSE for each cell that has text.This will suppress the vertical size of the text to the row height that you have specified

4.Create a new report in the same project.

5.Create a dummy dataset in the sub report.I usually use: SELECT NULL

6.Pull a table onto the grid and delete all but one cell

7. Set the cell = “”

8.Set the column width to the column width you had in the original report say .625

9.Return to your original report and create an additional header on the report

10. Drag a sub report into each column of the new header cell and set it equal to the new report

11. Run the report.Hidden columns now only take up the .125 space.

No comments:

Post a Comment