开发者

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

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 place开发者_开发问答d 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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜