How to print pdf without report viewer in c# windows forms
<pre><code>//declare a memorystream object that will hold out output
            MemoryStream oStream;
            //here's the instance of a valid report, one which we have already Load(ed)
            ReportDocument crReport = new ReportDocument();
            /**remember that a valid crystal report has to be loaded before you run this code**/
            //clear the response and set Buffer to true
            Response.Clear();
            Response.Buffer = true;
            // ...Portable Document (PDF)
            oStream = (MemoryStream)crReport.ExportToStream(ExportFormatType.PortableDocFormat);
            //ResponseContext.EnumReturnType = t
            Response.ContentType = "application/pdf";
            //in case you want to export it as an attachment use the line below
            /*
            crReport.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "Your Exported File Name");
            * */
            try
            {
                //write report to the Response stream
                Response.BinaryWrite(oStream.ToArray());
                Response.End();
            }
            catch (Exception ex)
            {
                MessageBox.Show("problem occured");
            }
            finally
            {
                //clear stream
                oStream.Flush();
                oStream.Close();
                oStream.Dispose();
            }
</code></pre>

<p>I found this code on internet but I couldn,t configur it.
Is there a possible way to do this. or do we always need to use cristal report viewer to get print out.</p>
