i have trying to develop an application in which i have to export a report to pdf file.
i use crystal reports for that.
i also have to stream that report to client machine and do not have to store that on server.
this happens on a button's click event which is as follows.
protected void Button1_Click(object sender, EventArgs e)
ReportDocument StReport = new ReportDocument();
string reportPath = Server.MapPath(@~Report.rpt
crExportOptions = StReport.ExportOptions;
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
MemoryStream ms = (MemoryStream)StReport.ExportToStream(ExportFormatType.PortableDocFormat);
i get the error i mentioned in the subject of this post.
kindly help me in this matter and show me the way forward.
thanks in advance.