SAP Knowledge Base Article - Public

1874407 - Elements in non-printable area are moved to printable area when printed

Symptom

  • Reports with elements in non-printable area are shown correctly in print preview
  • When the report is sent to a printer, the elements are scaled and thus moved to printable area resulting in incorrect looking output

Environment

  • SAP Crystal Reports, developer version for Microsoft Visual Studio
  • Microsoft Visual Studio (2010 / 2012)

Cause

  • The registry key DealWithMinimalMarginsWhenPrinting is not being read by the Crystal Reports Print Engine
  • The issues has been reported for a fix
  • Reference: ADAPT01684471

Resolution

  • The issue is resolved in Service Pack 6 for SAP Crystal Reports, developer version for Microsoft Visual Studio
  • The Crystal Reports SDK (PrintToPrinter API) will not read the key
  • Only the InProc RAS SDK will read the registry key
  • Example code:
    ReportDocument reportDocument = new ReportDocument();
    reportDocument.Load(@"C:\Test\CrystalReportsApplication1\CrystalReport1.rpt");
    CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions printReportOptions = new CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions();
    printReportOptions.AddPrinterPageRange(1, 1);
    printReportOptions.PaperSize = CrystalDecisions.ReportAppServer.ReportDefModel.CrPaperSizeEnum.crPaperSizePaperA4;
    printReportOptions.PrinterName = @"\\CNPVGL002\CN64_BW";
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rptClientDoc = reportDocument.ReportClientDocument;
    rptClientDoc.PrintOutputController.PrintReport(printReportOptions);

 

 

 

Keywords

CRVS CR4VS shrunk shrink small printer key registry margin , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio