I am developing a web application in which crystal reports are being used for Reporting.
Developing Environment : MS Visual Studio 2005 (ASP.NET, C#.NET And Crystal Reports)
I'am using the following lines of code
ReportDocument objRd=new ReportDocument();
objRd.Load("SomeReport.rpt");
objRd.SetParameterValue(0,"Value");
objRd.PrintOptions.PrinterName="The Printer Connected";
objRd.PrintToPrinter(1,false,0,0);
objRd.Close();
The code works fine in debug mode, the printer is getting invoked and i can get a print on the paper.
when the code is Live(hosted in IIS) after executing the line objRd.PrintToPrinter(1,false,0,0); no further process is going on (to check this i was gone to "Debug -> Attach to Process" in Visual Studio IDE and attached the Browser so that when i am accessing the Hosted website through URL i can get back to IDE and continue in Debug).
Either the system it self not getting hang or the Application.
I can redirect the ReportDocument to Crystal Report Viewer and can convert it to PDF,DOC etc., but i need to print the output directly to the printer.
Please Help me in solving the issue.
Thanks in Advance
EDIT
I am really feeling bad now that stackoverflow cannot solve my problem in a week(????).
Recently i tried a method suggested by my friend i.e. giving full access control to the hosted folder. still the issues stands :(.