SAP Knowledge Base Article - Public

1533800 - 'System.Runtime.InteropServices.COMException (0x80000201): Invalid printer specified' when printing reports using Crystal Reports .NET SDK

Symptom

The custom .NET application throws the following error when trying to print Crystal reports:

 

System.Runtime.InteropServices.COMException (0x80000201): Invalid printer specified.
at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrinterName(String newVal)
at CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PrinterName (String value)
at Company.PrintReport(ReportClass report, String printerName)

Environment

  • Windows Server 2003 Service Pack 2 64 bit.
  • Crystal Reports Basic Runtime for Visual Studio 2005 (x86).
  • Windows Services.

Reproducing the Issue

Print report when multiple instances of windows services are running on the windows server.

Cause

The error message appears because the application has exceeded the default print job limit of 75.

 

Resolution

CAUTION

The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system. Use the Registry Editor at your own risk. It is strongly recommended that you make a backup copy of the registry files before you edit the registry. For information on how to edit the registry key, view the 'Changing Keys And Values' online Help topic in the Registry Editor (Regedit.exe).
  • Increase the value of PrintJobLimit by modifying the registry key value mentioned below.
  • HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\InprocServer\PrintJobLimit

Note:

  1. This may apply to other versions of Crystal Reports as well.
  2. The default value of 75 is the predetermined value for best performance in tested environments. Changing this value could affect performance of the system.

MORE INFORMATION

A print job includes main reports, subreports, and in-session report objects.

See Also

Keywords

System.Runtime.InteropServices.COMException (0x80000201): Invalid printer specified, Invalid printer specified, Crystal Reports, .NET SDK, 10.2, System.Runtime.InteropServices.COMException, 0x80000201.
, KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports XI R2 ; SAP Crystal Reports, developer version for Microsoft Visual Studio ; SAP Crystal Reports, version for Visual Studio .NET 2005 ; SAP Crystal Reports, version for Visual Studio .NET 2008