1
我在創建RDLC報告時遇到了錯誤。 錯誤是報告(rdlc)處理期間發生錯誤
「報表處理期間發生錯誤。 無法創建調用‘讀取’時,數據讀取器是關閉的是不是一個有效的操作,數據源‘ds_SalesQuotation’。 的連接。 無效試圖在讀取器關閉時調用Read。「
我創建了ds_SalesQuotation.xsd文件。 在RDLC報告中給出的數據集名稱爲「dsSalesQuotation」,並設置datasourse爲「ds_SalesQuotation」
我的代碼是reportviewr(的.aspx)
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
using (BillingAppEntities context = new BillingAppEntities())
{
var val = context.Sp_SalesQuotation(id);
ReportDataSource rd = new ReportDataSource("dsSalesQuotation", val);
ReportViewer1.LocalReport.DataSources.Add(rd);
ReportViewer1.LocalReport.Refresh();
}
}
}
有沒有在我的code.please任何錯誤的檢查,任何人..
能否請你看看我的答案[報告處理過程中出現錯誤。在ASP.NET MVC中的RLDC報告](http://stackoverflow.com/questions/28966954/an-error-occurred-during-report-processing-rldc-reporting-in-asp-net-mvc)? –