Skip to Content
0
Jan 04, 2023 at 07:06 PM

PrinterToPrint error printer not installed

239 Views Last edit Jan 25, 2023 at 09:56 PM 2 rev

I am using VS 2019 and CR 13. I have 64-bit installed on the Dev environment. The test environment has CR 13 for VS 32-bit (The below issue happened even when I had 64-bit runtime on the testing server - windows 2016). The same setup was working before. Please let me know if there is any workaround. The print service is a windows service, referencing the report's project. Web config is referring to Crystal reports 13.0.4000.0.

I am not seeing the crystal reports 13.0.4000 version on the Testing server. C:Windows\assembly shows only 10.0.5.3700. But, it has only CrystalDecisions.Data.AdoDotNetInterop version of 13.0.4000.

Please suggest.

Issue:

INFO
2023-01-04 13:22:22,623 MYPROJ.Reports.CrystalReportAdapter -
CrystalReportAdapter.PrintToPrinter: print(,HP_DESK_M604,Auto,,,1)<br>DEBUG 2023-01-04 13:22:22,623 MYPROJ.Reports.CrystalReportAdapter
-  Psettings Printer : HP_DESK_M604  <br>DEBUG 2023-01-04 13:22:22,655 MYPROJ.Reports.CrystalReportAdapter
-  Report Doc Printer :   <br>INFO 2023-01-04 13:22:22,655 MYPROJ.Reports.CrystalReportAdapter -
CrystalReportAdapter.PrintToPrinter: print(,,Auto,DefaultPaperSize,Simplex,1)<br>ERROR 2023-01-04 13:22:22,889 MYPROJ.Reports.ReportHelper -
PrintForms<br>System.Drawing.Printing.InvalidPrinterException: No printers are
installed.<br>   at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal(String
printer)<br>   at
System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal()<br>   at
System.Drawing.Printing.PrinterSettings.GetHdevmode()<br>   at
System.Drawing.Printing.PageSettings.GetPaperSize(IntPtr modeHandle)<br>   at
System.Drawing.Printing.PageSettings.get_PaperSize()<br>   at
CrystalDecisions.CrystalReports.Engine.PrintOptions.FindPaperSize(PrinterSettings
printer, PaperSize size)<br>   at
CrystalDecisions.CrystalReports.Engine.PrintOptions.CopyTo(PrinterSettings printer,
PageSettings page)<br>   at
CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32
nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)<br>   at
CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32
nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)<br>   at MYPROJ.Reports.CrystalReportAdapter.PrintToPrinter(ReportDocument
reportDoc, PrintoutSettingData pSetting, Int32 PageCount)<br>   at MYPROJ.Reports.ReportHelper.PrintForms(Int32
printOrderID, String printerName, Int32 receiptCount, Int32 certificateKind,
Int32 locationID)<br><strong>ERROR 2023-01-04 13:22:23,420 MYPROJ.Reports.ReportHelper -
ReportHelper.Print::ERROR job=Print QueueID(801236), PrintOrderID(804278) to
[HP_DESK_M604], Printer Location [1], exception=PRINTING_FAILED,
base.exception=No printers are installed.<br></strong>DEBUG
2023-01-04 13:22:23,420 MYPROJ.Business.PrintOrderQueueDB -
PrintOrderQueueDB.UpdateQueue:entering<br>DEBUG
2023-01-04 13:22:23,452 MYPROJ.Business.PrintOrderQueueDB -
PrintOrderQueueDB.UpdateQueue:returning ReturnCode=[0]<br>INFO
2023-01-04 13:22:23,467 MYPROJ.Reports.ReportHelper -
ReportHelper.Print::printing done...