我希望手动向数据集中添加值生成rdlc报告,因为我将日期作为查询的输入参数。我使用以下代码实现:
//my list get populated with the relevant records according to its date and I'm using the tableadapter of my dataset to do that
List<DailySalesEntity> list = DailySalesHandler.GetSalesByDate(dateTimePicker1.Value);
reportViewer1.LocalReport.DataSources.Clear();
Microsoft.Reporting.WinForms.ReportDataSource report = new Microsoft.Reporting.WinForms.ReportDataSource("DataSet_Dailysales", list);
reportViewer1.LocalReport.DataSources.Add(report);
reportViewer1.LocalReport.Refresh();
我正在使用一个表格来展示我的数据,使用了数据集。我已经正确地将报表设置给报表查看器。我没有收到任何异常信息。但是报表一直在加载,无法显示。我做错了什么?
如何通过传递参数到查询中来填充数据集,并在报表中使用生成的数据集?