Symptom
- When calling the PrintToPrinter API, the application freezes
- Windows Server 2008 64-bit (w/ 32-bit runtime), no error is returned
- Windows 7 64-bit (w/ 32-bit runtime), the following error is thrown:
System.Drawing.Printing.InvalidPrinterException: Settings to access printer 'NOEXIST' are not valid.
Environment
- Crystal Reports for Visual Studio 2010
- Visual Studio 2010
- Windows Server 2008 64-bit
- Windows 7 64-bit
Cause
- No printer driver installed
Resolution
- Install a valid printer
- Use a Try/catch around the print function
- For printers exposed to System account see the Microsoft Article COM objects fail to print when called from ASP
Keywords
CR2010 2010 CR4VS2010 CR4VS VS2010 NET2010 Crystal Reports for .NET Framework 4.0 crforvs 13 driver printing print , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To
Product
SAP Crystal Reports, developer version for Microsoft Visual Studio