strPath = "../Reports/RptQuotationSlip.rpt"; rptDoc = new ReportDocument(); rptDoc.Load(Server.MapPath(strPath)); string strServerName = ConfigurationManager.AppSettings["RptServerName"].ToString(); string strDatabaseName = ConfigurationManager.AppSettings["RptDBName"].ToString(); string strPassword = ConfigurationManager.AppSettings["RptPassword"].ToString(); string strUserID = ConfigurationManager.AppSettings["RptUserID"].ToString(); rptDoc.SetDatabaseLogon(strUserID, strPassword, strServerName, strDatabaseName); rptDoc.SetParameterValue("@1_QuoNo", QuoteID); rptDoc.SetParameterValue("@1_AgentName", strAgentName); rptDoc.SetParameterValue("@1_AgentTelNo", strAgentTelNo); rptDoc.SetParameterValue("@1_QuoNo", QuoteID, "RptNCDValues"); rptDoc.SetParameterValue("@1_QuoNo", QuoteID, "RptExtraCoverageDtls"); rptDoc.SetParameterValue("@1_QuoNo", QuoteID, "RptExtraCoverNote"); objStr = (System.IO.MemoryStream)rptDoc.ExportToStream(ExportFormatType.PortableDocFormat);//I am getting error here. Response.Clear(); Response.Buffer = true; Response.ContentType = "application/pdf"; Response.BinaryWrite(objStr.ToArray()); rptDoc.Refresh(); Response.Flush(); Response.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)