SSRS 2005 with matrix and list shows blank page between every data page when printing or exporting to PDF
Asked Answered
A

2

9

I am using SQL Server Reporting Services 2005 - I have created a portrait A4 report 8.5in by 11in.

The report consists of a header, body and a footer.

The body consists of a number of textboxes in a 2 column layout and underneath them a matrix placed onto a list.

The matrix consits of 2 fixed rows (with 1 fixed textual column in the top row and 2 dataset field columns in the bottom one) and a number of columns (each with a width of 0.875in and data taken from different dataset fields). I use the group expression =Ceiling(RowNumber(Nothing)/5) on the list, to make the matrix columns start below the previous ones every 5 repeated columns.

The problem I am facing is that a blank page (with only header and footer) is appearing between every page of report data when I export the report to PDF or print it physically, if the matrix spans more than one page of data. There is plenty of room for the columns of the matrix on the page. I have tried the following, but to no avail:

1) I checked that Page Width (8.5in) >= Body Width (7.20833in) + Left Margin (0) + Right Margin (0)

2) I checked that Page Height (11in) >= Page.TopMargin (0) + Header.Height (2in) + Body.Height (6.60417in) + Footer.Height (0.89583in) + Page.BottomMargin (0)

3) I played around with various margin values, ranging from 0in to 0.5in for the left, right, top and bottom margins.

4) I set all textboxes' CanGrow property to false. This also has the undesirable effect of chopping out the text when it cannot fit, but even so, the blank page problem still occurs.

5) I placed the list and the matrix together in a rectangle with the blank space (to the right of the matrix) outside the rectangle.

The only thing that stops the blank pages from appearing is changing the list grouping expression to =Ceiling(RowNumber(Nothing)/2), i.e. make the matrix start a new "table" every 2 repeated columns (rather than 5). This, however, I do not understand, as there is plenty of space for 3 other columns to their right and it is odd and untidy to just put 2!!

I would greatly appreciate any help in this! Thanks in advance! Tim

Authority answered 12/1, 2010 at 15:30 Comment(0)
E
14

For anybody who is having a similar problem in SSRS 2008, I found the only way to fix this was to set the property named ConsumeContainerWhitespace on the Report itself to true.

In my case the issue was that the matrix on the page was narrow in design mode with a lot of whitespace to the right. When rendered, the matrix was rendered much wider (due to the data) but the renderer would also include the whitespace, causing the report to be much wider than the actual page.

If you set this property, the extra whitespace does not get rendered.

Emmie answered 16/3, 2011 at 15:19 Comment(2)
I spent way too much time trying to figure this out only to find out I needed to flip a switch...Danford
Worked! Also spent way too much time on this. That property seems to be True by default on new reports... but was False on some of our old reports. SSRS 2008.Sewerage
I
0

If I understand you correctly I've solved this problem before. The matrix claims extra white space, the solution I used is as follows:

You need to consume the white space.

[-------page width------]
[matrix][-textbox hack-]

I think you can set the textbox to be invisible

Note: When I attempted this in 2005, it only worked when the invisible textbox spanned the entire line.

Ihs answered 22/11, 2010 at 22:48 Comment(2)
Based on the diagram I'm assuming all I need to do is put a text box next to my matrix and stretch it from the edge of the matrix to the edge of the page. This did not work for me.Parous
Hi Kelly, did you set the text box visibility to hidden? Yes I put the text box beside the matrix consuming all the free space. This solved the problem where every second page is blank because the report has become two pages wide triggered by hidden matrix cells not collapsing the matrix width.Ihs

© 2022 - 2024 — McMap. All rights reserved.