Search code examples
asp.netdeploymentcrystal-reportsweb-deployment-project

Error while printing crystal report, with that exception message "No printers are installed"


I got an exception with message "No printers are installed." while printing a report for depolyed release of our website.
I use _rptDocument.PrintToPrinter(1, false, 0, 0); to print a report.

I got that exception, even I've more than one printer installed on my machine. Also, I don't get that exception while development, everything while development is going fine.

I used "Publish Web Site" and "Web Project Deployment" options to publish/deploy website, but I got the same result.

Any suggestions?

Edit

Sample Code

DataSet dsResult = null;
rptDocument = new ReportDocument();
rptDocument.Load(Server.MapPath("WINGR0040.rpt"));

// Fetch report data.
...

rptDocument.SetDataSource(dsResult);

// Print report.
rptDocument.PrintToPrinter(1, false, 0, 0);

Solution

  • I would really export the report to PDF so the user prints at their desktop printer. However maybe the Print Spooler Service is stopped on the iis server so crytsal is confused.