Word export sets margin-top, margin-bottom to 0mm - by A8524488-3F03-4D87-9B9E-D5EC0C426502

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


11
0
Sign in
to vote
ID 614558 Comments
Status Closed Workarounds
Type Bug Repros 7
Opened 10/18/2010 12:53:37 AM
Access Restriction Public

Description

When exporting serverreports with reportviewer webcontrol to word, margin-top and margin-bottom of page are zero. So, page header and footer are always cutted when printing.

Export to excel is the same.
Export to pdf and tiff is fine.

Loading report as localreport into reportviewer brings expected results. But I have to load them as serverreports.
Sign in to post a comment.
Posted by Mike Honey - Manga Solutions on 8/13/2014 at 10:40 PM
This bug still occurs in SQL 2014, 4 years later ... sigh. As the only feature added to core SSRS for SQL 2014 was Chrome support, I suspect this is the end of development/enhancements for SSRS, so I'm not holding my breath.

That previous workaround no longer works in SQL 2014 - it somehow triggers column width resizing in Word ... I've come up with a new Workaround ...
Posted by robinwilson16 on 2/24/2014 at 2:14 AM
This bug/feature still occurs in SQL Server 2012 SP1 with the latest CU.

So basically it is not possible to set the property as it is set differently in Word than it is in the Reporting Services control but couldn't either one of these be updated such as adding the additional property to the control to enable export to Word to work correctly as in the current implementation it doesn't give the correct output and doesn't match what has been designed in Visual Studio.

Surely this can't be by design?
It requires the end user to have to amend the output every time they export.

Also the bug with printing ID cards is still not fixed and they print at about 1/8th of the correct size unless you export to PDF first.

Robin
Posted by Piotr Palka on 9/5/2012 at 11:04 AM
Especially flustrating is that this "feature" is introduced in SSRS 2008 R2.
SSRS 2008 is setting "header from top" correctly, based on top margin from the report.
Posted by Andreas 0815 on 5/24/2012 at 4:46 AM
What cheek to close this obvious bug without any effort to try to solve it or to provide a workaround! That's a slap in the face of the customers and seems to be usual behavior of Microsoft - maybe you're lucky and the bug is resolved at the next major release if you spend your money again to pay for that.
Not amused! Andreas.
Posted by Sheepy Sheep on 3/5/2012 at 4:24 PM
While I can see the explanation of how the bug happens, that does not in any way help solve the issue.

It's confusing for SSRS to have 2 different margin behaviours:
- Header/footer to fall within the specified margin (e.g. on the report-viewer, PDF, and TIFF exports)
- Header/footer to ignore the specified margin, and always use zero (on Word and Excel)

The behaviour that can be deemed correct by users/developers is clearly behaviour#1: Word's headers/footers should fall within the printable area. There is no possible use-case where forcing zero margin (behavior#2) is ever desirable. Even if it were, this behaviour has to be applied consistently across all report formats.

As such, I consider this issue to be a bug that definitely requires a fix.

(Combined with the fact that SSRS Word export also removes all extra padding spaces off headers/footers, this makes headers/footers in SSRS unusable in practice, hence quite a severe flaw).
Posted by Sheepy Sheep on 3/5/2012 at 3:53 PM
How can this bug be closed without even any fix or workaround? The problem still persists.
Adding extra space on the header/footer does not even do the trick (word export will automatically remove these extra spaces). As the result, header/footer can never print properly as they always fall outside the printable area.
Please provide a fix, or at least a workaround for current version.
Posted by Riccardo [MSFT] on 5/23/2011 at 10:46 PM
We're closing this bug. Thanks again.

Riccardo Muti
SQL Server Reporting Services
Posted by Riccardo [MSFT] on 3/26/2011 at 7:05 PM
Thanks for your feedback. The margins in the Word document do match those in the report at 2 cm or 0.79 in. However, Word and SSRS treat page headers and footers differently. Word actually positions them inside the page margins, whereas SSRS positions them inside the area that the margins surround. As a result, in Word, the page margins do not control the distance between the top edge of the page and that of the page header (or similarly for the page footer). Instead, Word has separate "Header from Top" and "Footer from Bottom" properties to control those distances. Since RDL does not have equivalent properties, the Word renderer sets these properties to zero.

Hope that helps,

Riccardo Muti
SQL Server Reporting Services