The CR 2010 for VS engine changes the margins and scales the report but only when printing.
Environment:
OS: Windows 7 x64 / Windows 2008 x64
VS: VS 2010 x64
CR designer: CR 2008 SP3.5
CR engine: CR 2010 for VS SP1
We have upgraded the Crystal Reports engine from version 10 to u201CCrystal Reports 2010 for VSu201D and are now having major issues with printing reports to preprinted papers, giro forms etc. because the report margins are changed and the reports are scaled (when report elements are in non-printable area?). Reports with elements in non-printable area are shown correctly in print preview (CR 2010 CrystalReportViewer) but moved to printable area when printed. This behavior was different in CR 10. Changing the PrintLayoutSettings in code is ignored when printing.
Error u2013 The printed reports are scaled:
- Print in the CR 2008 Designer SP2
- CR 2010 for VS SP1
OK u2013 The reports are not scaled:
- Print in the CR 2008 Designer SP3.5
- Print in the CR 10 Designer
- CR 10 engine
Test:
1) Crystal Reports Designer 2008 (with SP 3.5)
a) Create a new blank RPT file.
b) Set report margins to 0,0,0,0 in Page Setup.
c) Add a box in the upper left corner (x=0, y=0).
d) Select "Print preview" and validate that the box is located in 0,0 in preview window.
e) Select u201CPrintu201D and validate that the box is located in 0,0 of the paper. Some of the box borders might be outside of the printable area but that is ok.
2) Visual Studio 2010 and u201CCR 2010 for VSu201D with SP1:
a) Create a new Windows Forms Application project (.NET Framework 4.0). Set project to u201C.NET Framework 4.0u201D and platform target u201Cx86u201D.
b) Add the CrystalReportViewer control to Form1.
c) Add the RPT file to the CrystalReportViewer control
d) Run the application
e) Validate that the box is located in 0,0 in the CrystalReportViewer control.
f) Select the "Print" icon in the CrystalReportViewer
h) Click the "Print" button and validate that the box is moved to the printable area which is wrong.
Notice: In the print dialog (CR 2010 for VS) select the "Layout" tab page and see that "Scale u2026" is selected and cannot be changed. This is different from the CR 2008 Designer even though that it is the same report file and printer.