相关疑难解决方法(0)

Report Viewer X Dapper

我正在ReportDataSource使用Dapper进行查询.但是,即使有IEnumerable加载的数据,我也有一个空报告.当你花一件Datatable作品.

如何使用Dapper从查询传递数据ReportViewer

this.reportViewer.LocalReport.DataSources.Clear(); 
DataTable dt = new DataTable(); 

dt = CN.Query(Sql, param);

Microsoft.Reporting.WinForms.ReportDataSource rprtDTSource = new Microsoft.Reporting.WinForms.ReportDataSource(dt.TableName, dt); 
this.reportViewer.LocalReport.DataSources.Add(rprtDTSource); 
this.reportViewer.RefreshReport(); –
Run Code Online (Sandbox Code Playgroud)

c# reportviewer dapper

4
推荐指数
1
解决办法
2212
查看次数

标签 统计

c# ×1

dapper ×1

reportviewer ×1