none
Printout differs from Preview / Unexplainable Margins / Rendering issue? RRS feed

  • Question

  • Hey guys,

    first of all, thank you in advance for reading this thread and the time you may invest into thinking about a possible solution or some kind of advice for me. I dont really know where to start but i will try to explain my problem as good as i can and give you some background information.

    One part of our software product, is to develope RS Reports for our customers. Those can be developed from scratch (new purposes/functions etc.) or be based upon reports our customers has used in the past, but should get replaced by our software. The customer of my current project is already using a set of reports, whereas my job is now to develope/remake those by using Reporting Services.

    I am doing this for like 5-6 weeks now, but i have been busy with finding a solution for my current problem for almost 2 weeks now.

    My Problem:
    Each report looks great in the preview, even though you cant really count the centimeters and really say if its correct, it looks correct. As soon as i print this report, it seems like the whole "page" including header, footer and body is moved by like 0.6cm to the right bottom corner. So basically as if you would add 0.6cm to your left and top margin.


    Things i noticed while trying to solve this:
    • By exporting the report to PDF using the exportfunctions the ReportViewerControl offers and turning off the adjustment of the pagesize within the printdialog in Adobe Acrobat, i can print the report and get a perfect looking report. A short remeasure shows that all margins are printed as they were supposed
    • Using different printers didnt really help, as the problem occured on each printer, even though the margins has been slightly different on each printout
    • Due to the fact that our software needs to be capable of being run on Windows 2000, we cant really go and use any .NET Framework upon .NET 2.0. So we need to keep using the ReportViewerControl 2005 which doesnt require .NET 3.0/3.5. BUT by trying the ReportViewerControl 2008, i noticed that this problem does not occure anymore. All margins are shown and printed perfectly in this control but as stated we have to stick to .NET 2.0 so i cant really use the 2008 version of the Control as it requires .NET 3.5
    • When i am trying to use the "Page setup"-dialog where you can set the pagesize and margins, all margins set by me are shown in inch, whereas the ReportViewerControl 2008 shows those in cm as used in my report
    • As we just got new developement PCs and those are using Vista x64, i checked if the problem occures on XP computers as well and yes it does. So it's not a problem with the operating system.
    • I tried using different printer drivers if possible and available, so i used different ones with the XP computer and the vista computer, but the problem is still there
    • By printing the report directly from Visual Studio 2005 and the reportviewer there, all margins are correct
    • Using the Report Viewer DLLs of the Report Viewer 2005 Redistributeable SP1 didnt help either

    Hardware/Software:
    • Printer: EPSON AL-CX11 Advanced
    • Client Computer Operating System: Windows Vista Business x64, SP 1
    • Server Computer Oprating System: Windows Server 2003 R2, Enterprise x64 Edition, SP 2
    • Database / Reporting Services: Microsoft SQL Server 2005 + Service Pack 2 + Hotfix http://support.microsoft.com/kb/935356/en-us (helps to get rid of the black pages you get when viewing a report in the ReportViewerControl while having service pack 2 installed only)

    I am kind of lost now, as i have no idea how to fix this, but as this forums and search results shows there are a lot of people experiencing this problem. I hope anyone can help me on that one. Thanks!!
    Thursday, April 9, 2009 11:28 AM

All replies

  • Okay after 1000 printouts later and 2 weeks of searching in this forum and all over the web i figured out that the problem actually is just a stupid setting called "OriginAtMargins", which is by default set to false (Just god knows why). However, after setting this one to true, i got my report printed with all margins being correct. Whats left now, is to figure out, how to set this property to true for the PrintDocument in my report viewer control.
    Thursday, April 9, 2009 12:27 PM