简体   繁体   中英

Printing Crystal Reports

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM