How to stop a single extra page at end of multi-page SSRS reports when exported to Word

Posted on 2013-12-11
Last Modified: 2013-12-12
Hello Experts,

I am using SSRS 2008r2 in native mode, exporting to .DOC format and opening the resultant file in a mixture of Word 2007 and 2010. When the report fits on one page - even when almost full - one page is all I get, but when the content spills over onto a 2nd page I get 3 pages. Page 3 has nothing but the header and footer content.

I'm not getting alternate blank pages, so I haven't gone over the width boundaries. It isn't spilling over onto a 2nd page when a single page is almost full, so I haven't got surplus white space after my last object. Printing to preview / paper, plus export to PDF are fine.

As a matter of interest, I have set the report page to A4 Portrait with zero margins all round, but then put header, body and footer objects in rectangles located at 0in from top, 0.75in from left, with empty space above the topmost object in the header rectangle, and similar below the last object in the footer rectangle. Doing this gets around the issue of the Word renderer removing any blank space above the first and below the last object, then having stuff outside the printer's printable area. But, this issue was present before I rectified that.

The Word document has recognised A4 portrait, and the zero margins, and that aspect looks to work well with my simulated margins.

I am aware of TechNet Exporting to Microsft Word, particularly:
Repagination may cause page breaks to be inserted in locations where you did not intend to add them and, in some instances, may cause the exported report to have two successive page breaks in a row or add blank pages. You can try to change Word's pagination by adjusting the page margins.

But why the extra page, and why only when there is more than one page? How should the margins be adjusted to try to change the pagination, and is this what is happening here? Anyone know of any other workaround or things to check / try?

The object of export to Word is to allow users to add additional information in free text before printing. So, yes, they could remove the extra unwanted page, and modify all other page footers for the Page x of y, but they will gripe and point fingers at me :)


Regards and Thanks
Question by:SeeHearMark
  • 3
  • 2
LVL 76

Expert Comment

ID: 39712751
I have no knowledge of your particular circumstance, but I have noticed, since Word 97, and perhaps earlier, that an extra blank page is sometimes produced,  especially following a table,

This is probably a problem with the printer driver, though this circumstance seems to catch out most of them.

It might help if we could seen an example, so could you please post a sample offending document.

Author Comment

ID: 39713518
Hi Graham,

Thanks for your response.

Here are two samples, edited to remove identifying information, although I have been VERY careful not to remove any markup. Note that, on the single page, the closing paragraph mark is immediately following the content of what was the SSRS Body, whereas on the multiple page sample, which should be 3 pages but comes out at 4, the closing paragraph mark is on the 4th page.

LVL 76

Accepted Solution

GrahamSkan earned 500 total points
ID: 39713753
Yes, it's the mandatory final paragraph mark following a table that completely fills the otherwise last page,

If its font is set to Hidden and the option to print hidden text is turned off, the blank page shouldn't print.

Author Comment

ID: 39713778
Yep, that works a treat, including recalculating the page count. Thanks for that, and I will make sure you get a share of the points, as it is a reasonably simple task to advise the users to remove the surplus page this way.

Now all I need is for someone to tell me how I can get SSRS to not create it like this in the first place :) I'll leave the question open for 24 hours or so in the hope of someone out there not thinking we're on the way to a resolution, and request attention if nothing by then.


Author Closing Comment

ID: 39713846
In fact, no need, as I found my own solution. I just added a rectangle after my tablix, flagged for new page before rectangle, then placed a text box inside it that says "This page intentionally left blank for notes". Because Word then has some actual text after the table SSRS builds, it handles the page breaks properly.

It might not suit all situations, but its fine with us :)

Can I share the points with myself???? Only joking, but have marked as Good rather than Excellent, as it is only a partial solution.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question