【发布时间】:2015-07-06 05:01:32
【问题描述】:
如何将数据库中的数据逐页加载到 MS Report 查看器中?
现在我正在使用以下代码:
private void LoadData()
{
reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource();
merchent = new Merchant();
reportDataSource1.Name = "DataSet1";
reportDataSource1.Value = merchent.GetProducts();
this._reportViewer.LocalReport.DataSources.Add(reportDataSource1);
this._reportViewer.LocalReport.ReportPath = "../../Report1.rdlc";
_reportViewer.RefreshReport();
}
这里我想一开始就将所有数据添加到 DataSource 中。单击下一步按钮时,我想添加下一页记录集。
有什么办法吗?
【问题讨论】:
-
在 ReportingServices 中,您必须将 InteractiveHeight 设置为大于 0 的数字。如果设置为 0,分页将被禁用
-
@Sreejith 我阅读问题的方式是加载和设置一次数据源(根据显示的代码),每页有一个产品。我没有将此问题解释为禁用分页。
标签: c# wpf ms-reports