Note that there are some explanatory texts on larger screens.

plurals
  1. POcrystal reports, ReportDocument.printtoprinter() not executing in live code
    primarykey
    data
    text
    <p>I am developing a web application in which crystal reports are being used for Reporting.</p> <p><strong>Developing Environment :</strong> MS Visual Studio 2005 (ASP.NET, C#.NET And Crystal Reports)</p> <p>I'am using the following lines of code</p> <pre><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(); </code></pre> <p>The code works fine in debug mode, the printer is getting invoked and i can get a print on the paper.</p> <p>when the code is <strong>Live(hosted in IIS)</strong> after executing the line <strong>objRd.PrintToPrinter(1,false,0,0);</strong> 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).</p> <p>Either the system it self not getting hang or the Application.</p> <p>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.</p> <p>Please Help me in solving the issue.</p> <p>Thanks in Advance</p> <p><strong>EDIT</strong></p> <p>I am really feeling bad now that stackoverflow cannot solve my problem in a week(????).</p> <p>Recently i tried a method suggested by my friend i.e. giving full access control to the hosted folder. still the issues stands :(. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload