0

I am facing a problem in printing Crystal Reports in Windows Forms app. Normal application flow is working like charm but I want to handle the situation when printer is not available or is not ready for printing. I was looking for WMI but I am facing problem like mentioned here, that my printer always return Status 3 or State 0 (idle). Now I am looking for exceptions of PrinttoPrinter method of Crystal Reports but yet no luck. Any idea will be appreciated.

Thank in advance

Community
  • 1
  • 1

1 Answers1

0

In above article link, ConfigManagerErrorCode is option given as a status of your current printer.

you can check whenever the 0 value comes, then you only give the printToprinter command else give custom or printer error method based on the value you retrieve.

Win32_Printer class

Ajay2707
  • 5,690
  • 6
  • 40
  • 58