[英]C# reportviewer is showing no data
private void SetReportSource()
{
DataTable dt;
dt = FrmSummaryController.GetSummaryReport();
this.rptMySummary.Reset();
this.rptMySummary.LocalReport.ReportPath = "Report.rdlc";
ReportDataSource rds = new ReportDataSource("dsNewDataSet_Table", dt);
//this.rptMySummary.LocalReport.DataSources.Clear();
this.rptMySummary.LocalReport.DataSources.Add(rds);
this.rptMySummary.LocalReport.Refresh();
}
这是我用来填充报表查看器的代码。 我确定数据表dt中有6行数据。
报表查看器中仍然没有行,也没有标题。
你能告诉我我在做什么错。
跟着这些步骤。 和报告绑定丢失
reportDocument.Load(this.MapPath("crpt_test.rpt"));<br>
reportDocument.Database.Tables[0].SetDataSource(dsReport.Tables[0]);<br>
rptviewer.ReportSource = IT_proj_reportDocument;<br>
rptviewer.Visible = true;<br>
rptviewer.DataBind();<br>
导出为任何文件格式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.