1
Answer

Converting the web application code in windows form application code

Good morning everybody...

the following code works well in .aspx page that is in
web application..
now the same thing i want to do in windows form application.. can anybody help me..

The code is for without saving the pdf file take a print.. 
it works well in .aspx page 
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load("E:\\Report1\\over\\CrystalReport1.rpt");
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load("E:\\Report1\\over\\CrystalReport1.rpt");
MemoryStream oStream; // using System.IO
oStream = (MemoryStream)
cryRpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(oStream.ToArray());
Response.End();

In windows form the Response .clear or response.buffer is not supported
error is missing namespace or directive is displaying...

Answers (1)