Hi
I am using crystal report print method PrintToPrinter, since I want to print the report directly without converting it to .pdf or any format in my asp.net application. The default printer has been set and I am using this method.
protected ReportDocument reportDocument;
reportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
reportDocument.Load(Path);
PrintDocument printDocument1 = new PrintDocument();
string prt1 = printDocument1.PrinterSettings.PrinterName;
reportDocument.PrintOptions.PrinterName = prt1;
reportDocument.PrintToPrinter(1, false, 0, 0);
The program runs fine and the printer gives the print when I am using it throught the debugger (Visual Studio play method). However when I run the website through IIS it gives :
System.ComponentModel.Win32Exception: The specified printer has been deleted
I have searched the internet and found no solution, the website has to be run on client base and on client machines the default printers will be specified.
Also: I was hosting the website on windows xp, when I host it on windows server 2003 and click the event nothing happens
Thanks in Advance
I am using crystal report print method PrintToPrinter, since I want to print the report directly without converting it to .pdf or any format in my asp.net application. The default printer has been set and I am using this method.
protected ReportDocument reportDocument;
reportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
reportDocument.Load(Path);
PrintDocument printDocument1 = new PrintDocument();
string prt1 = printDocument1.PrinterSettings.PrinterName;
reportDocument.PrintOptions.PrinterName = prt1;
reportDocument.PrintToPrinter(1, false, 0, 0);
The program runs fine and the printer gives the print when I am using it throught the debugger (Visual Studio play method). However when I run the website through IIS it gives :
System.ComponentModel.Win32Exception: The specified printer has been deleted
I have searched the internet and found no solution, the website has to be run on client base and on client machines the default printers will be specified.
Also: I was hosting the website on windows xp, when I host it on windows server 2003 and click the event nothing happens
Thanks in Advance