如何在MS Report Viewer中逐页加载数据?

时间:2015-07-06 05:01:33

标签: c# wpf ms-reports

如何将数据从数据库逐页加载到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。我想在点击下一个按钮时添加下一页记录集。

有什么办法吗?

1 个答案:

答案 0 :(得分:1)

使用SSRS Page Breaks

否则,请使用SSRS尊重空白区域的事实,并故意在RDLC文件中添加空格以引起分页。

enter image description here