cancel
Showing results for 
Search instead for 
Did you mean: 

PrinterToPrint error printer not installed

polisetty_dinesh
Discoverer
0 Kudos

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... 

Accepted Solutions (1)

Accepted Solutions (1)

DonWilliams
Active Contributor
0 Kudos

Hi Sri,

As Dell noted you can't mix runtime.

CR runtime is for your app platform and not the OS platform.

Is this a WEB or Desk top application?

See my Blog to help upgrade your project:

https://blogs.sap.com/2020/10/30/upgrading-a-visual-studio-2008-2019-.net-project-with-the-latest-cr...

And note for SP 33 you must set the Copy Local to false for all CR assemblies.

To update your DEV PC install the CR for VS for VS 2019 or lower.

Once you have upgraded your project references as noted in the blog build your project and deploy.

Then on the Work stations or WEB app install the x86 or x64 bit MSI packages, you can't manually deploy the runtime, too many COM dll's and registry keys required.

On the download page there is a Printer test app, see if that works:

Printing Crystal Reports in .NET

Don

Answers (2)

Answers (2)

polisetty_dinesh
Discoverer
0 Kudos

Two versions were on my server as side-by-side installations (1st image), and one other application still using the 2008 version of CR.

The 2nd image is showing the folders where it was installed. The Dev environment has all Crystalreport dlls under the same location for 32 & 64bit.

I am confused about the lack of dlls on the server. Please confirm if this installation is correct or if am I missing something. How I can deal with 2 separate installations of CR? Lot of questions 😞 but I want to know this asap.

Thank you so much for your help!!

DellSC
Active Contributor
0 Kudos

You can't mix versions like you have on your test server. All of the assemblies need to be the same version and they need to be set up using the runtime installer - you can't just copy the files over as there are a bunch of registry entries that are required for the SDK to work. The server needs to be using the same version as the application that you're deploying was developed on.

Also, with newer versions of Windows, you have to have the printer installed under Printers and Devices in order to be able to access it - in older versions this was not a requirement.

-Dell