Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
4,490 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
  • 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 1500 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

876 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