Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all*

I have designed an web application in visual studio 2008 and report is generated in crystal report. It works fine in development server. But if i deploy on IIS7 then i got following error

No printers are installed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Drawing.Printing.InvalidPrinterException: No printers are installed.

Please help in resolving this error
Posted
Comments
thatraja 9-Jun-12 5:21am    
Show code
_Dhull 9-Jun-12 5:38am    
ReportDocument myReportDocument;
myReportDocument = new ReportDocument();
myReportDocument.Load(Server.MapPath("~//Report/DailySale.rpt"));
myReportDocument.SetDatabaseLogon("sa", "saa");
myReportDocument.SetDataSource(ds);
myReportDocument.PrintToPrinter(1, false, 0, 0);


*showing error in last line*
*working fine on iis6*
Stephen Hewison 9-Jun-12 13:41pm    
Are you expecting this to use a printer on the client machine? I think it might be trying to print to a printer on the server.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900