SAP Knowledge Base Article - Public

2829461 - RAS .NET SDK will get a different printing result compared to Crystal Reports Designer

Symptom

RAS .NET SDK will get a different printing result compared to Crystal Reports Designer

Environment

SAP Crystal Reports, version for Microsoft Visual Studio SP19

Reproducing the Issue

  1. Create a report and insert box from top to bottom, set all margin to 0, and uncheck DissociatePageSizeAndPrinterPaperSize options in Page Setup dialog
  2. Print this report via Crystal Reports Designer
  3. Try to use RAS .NET SDK api print this report: ReportClientDocument.PrintOutputController.PrintReport()
  4. Comparing the printing result, RAS .NET SDK printed with a large margin and the box size is slightly smaller than the output from Crystal Reports Designer

Cause

By default RAS .NET SDK will ignore the flag of DissociatePageSizeAndPrinterPaperSize, and always treat it as true even in report this options is uncheck or you set it via code.

Then the engine will print it according to Registry key value of DealWithMinimalMarginsWhenPrinting.

Resolution

This issue is fixed in the patches listed in the "Support Packages & Patches" section below.
The "Support Packages & Patches" section will be populated with the relevant patch levels once they are released.
For Business Intelligence Platform maintenance schedule and strategy see the Knowledge Base Article 2144559.

WARNING: The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems. Use the Registry Editor at your own risk. Refer to KBA 1323322 for more information.

Now by default installation of SAP Crystal Reports, version for Microsoft Visual Studio, the RAS .NET SDK printing result should be same as Crystal Reports designer 2013/2016

But please notice that, if you would like to get consistent printing result from Crystal Reports Designer and RAS .NET SDK, you should set the same registry key value of DealWithMinimalMarginsWhenPrinting.

By default, this registry key is not set by installer.

Crystal Reports 2013/2016 designer,

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DesignerOptions] "DealWithMinimalMarginsWhenPrinting"=”0”

SAP Crystal Reports, version for Microsoft Visual Studio, 

32bit SDK Application

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\DesignerOptions]  "DealWithMinimalMarginsWhenPrinting"=”0”

64bit SDK Application

[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\DesignerOptions] "DealWithMinimalMarginsWhenPrinting"=”0”

Registry key usage:

When Dissociate Formatting Page Size and Printer Paper Size is checked:
"Reg key =1" or no key, keep large margins.
"Reg key = 0", turn on minimal margins printing.

When Dissociate Formatting Page Size and Printer Paper Size is unchecked:
The reg key does NOT take effect. Always print minimal margins.

Keywords

crforvs, printing, margins, registry, DealWithMinimalMarginsWhenPrinting , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio