.rdlc报告仅显示列表中的最后一行 [英] .rdlc report shows only last row from a list
本文介绍了.rdlc报告仅显示列表中的最后一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用.rdlc报告.其数据源已设置为BindingList< T> ;,但仅显示最后一条记录,而不显示所有记录.
这是我的代码:
CommonForms.frmMsReportViewer frm = 新 CommonForms.frmMsReportViewer();
frm.rvReportViewer.ProcessingMode = ProcessingMode.Local;
BindingSource bsListOfDelivery = 新 BindingSource();
bsListOfDelivery.DataSource = DeliveryList;
ReportDataSource rds = 新 ReportDataSource();
rds.Name = " ;
rds.Value = DeliveryList; // = bsListOfDelivery也不起作用
frm.rvReportViewer.LocalReport.DataSources.Add(rds);
frm.rvReportViewer.LocalReport.ReportEmbeddedResource = " ;
frm.Show();
我应该怎么做才能解决这个问题?
谢谢,
Saumitra Paul
解决方案
要查看所有行,请首先将表或列表拖放到报表中,然后将字段拖放到表或列表中. /blockquote>
I''m using a .rdlc report. Its datasource has been set to a BindingList<T>, but it shows only last record, not all records.
Here is my code:
CommonForms.frmMsReportViewer frm = new CommonForms.frmMsReportViewer(); frm.rvReportViewer.ProcessingMode = ProcessingMode.Local; BindingSource bsListOfDelivery = new BindingSource(); bsListOfDelivery.DataSource = DeliveryList; ReportDataSource rds = new ReportDataSource(); rds.Name = "CustomObjects_Delivery"; rds.Value = DeliveryList; //=bsListOfDelivery is also not working frm.rvReportViewer.LocalReport.DataSources.Add(rds); frm.rvReportViewer.LocalReport.ReportEmbeddedResource = "MyProject.AllReports.DeliveryReport.rdlc"; frm.Show();
What should I do to solve this problem?
Thanks,
Saumitra Paul解决方案To see all rows, first drag and drop a Table or a List to the report, then drag and drop the field into the Table or List.
这篇关于.rdlc报告仅显示列表中的最后一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文