【发布时间】:2009-08-04 12:24:16
【问题描述】:
我有一个数据集,它使用存储过程来获取数据。
我已经填写了数据集,一切正常。当我使用调试时,我可以看到数据集不是空的,但我无法使用 Microsoft Report Viewer 查看它。
这是我的代码:
private void frmPrint_Load(object sender, EventArgs e) {
this.reportViewer1.RefreshReport();
reportViewer1.LocalReport.DataSources.Clear();
GetCauseMachineMatrixTableAdapter adapter = new GetCauseMachineMatrixTableAdapter();
QpNibrolDataSet dataset = new QpNibrolDataSet();
adapter.Fill(dataset.GetCauseMachineMatrix, this.start, this.end);
DataTable DT = dataset.Tables[0];
ReportDataSource reportdatasource = new ReportDataSource();
reportdatasource.Name = "RDS_NAME";
reportdatasource.Value = DT;
reportViewer1.LocalReport.DataSources.Add(reportdatasource);
reportViewer1.LocalReport.Refresh();
reportViewer1.RefreshReport();
}
表格在说
未指定报表定义的来源
我做错了什么?
我不使用rdlc,因为当我尝试查看我的数据集时,没有显示列名;我使用的存储过程需要参数。
【问题讨论】:
标签: c# reporting-services