Solved

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

Posted on 2013-12-11
5
4,314 Views
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 :)

Help!

Regards and Thanks
Mark
0
Comment
Question by:SeeHearMark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
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.
0
 

Author Comment

by:SeeHearMark
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.

cheers
Certificate-of-Conformity-multip.doc
Certificate-of-Conformity-single.doc
0
 
LVL 76

Accepted Solution

by:
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.
0
 

Author Comment

by:SeeHearMark
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.

Regards,
Mark
0
 

Author Closing Comment

by:SeeHearMark
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.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

738 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