【发布时间】:2015-10-29 21:03:10
【问题描述】:
我在创建 RDLC 报告时遇到错误。 错误在于
" 报告处理过程中发生错误。 无法创建到数据源“ds_SalesQuotation”的连接。 关闭数据读取器时调用“读取”不是有效操作。 阅读器关闭时调用 Read 的尝试无效。 "
我创建了 ds_SalesQuotation.xsd 文件。 在 rdlc 报告中,将数据集名称设为“dsSalesQuotation”并将数据源设置为“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();
}
}
}
我的代码是否有任何错误。请任何人检查..
【问题讨论】:
标签: report rdlc dynamic-rdlc-generation