【问题标题】:How to load data page by page in MS Report Viewer?如何在 MS Report Viewer 中逐页加载数据?
【发布时间】: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


【解决方案1】:

使用 SSRS Page Breaks

否则,利用 SSRS 尊重空白对您有利的事实,并故意在您的 RDLC 文件中放置空白以导致分页。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-15
    • 1970-01-01
    • 2010-12-30
    相关资源
    最近更新 更多