【问题标题】:How to remove extra blank space in the bottom of RDLC report C#如何删除 RDLC 报告 C# 底部的多余空格
【发布时间】:2018-09-23 12:25:31
【问题描述】:

我只是想问一下报告下方多余的空格怎么去掉?我的目标是像超市那样打印收据。报告的高度必须根据内容动态变化。我希望有人可以帮助我。 :)

将数据设置为 rdlc 报告 public void print_now(BarcodeData 数据) {

        this.reportViewer2.LocalReport.DataSources.Clear();
        this.reportViewer2.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Materials", data.Materials));
        this.reportViewer2.LocalReport.SetParameters(
           new ReportParameter[] {
                new ReportParameter("Barcode","*"+data.Transaction.Barcode+"*"),
                new ReportParameter("Requestor",data.Transaction.Requestor),
                 new ReportParameter("DateRequested",data.Transaction.DateCreated),
                 new ReportParameter("Sewing",data.Transaction.Sewing),
                 new ReportParameter("Employeeid",data.Transaction.EmployeeId),
                 new ReportParameter("IpAddress",data.Transaction.IpAddress),
           }
           );



        this.reportViewer2.RefreshReport();


        //AutoPrint();    

    }

还有我的 Report.rdlc

【问题讨论】:

  • 你能显示报表定义吗?可能你有一些可见的部分页脚
  • 您好,先生。我已经更新了上面的帖子,而且我没有为我的 Report.rdlc 放置页脚,它只是没有页脚和页眉的普通正文

标签: c# rdlc receipt


【解决方案1】:

您应该将Height 放在InteractiveSize 属性的0 上。
这将使您的页面高度无限,并因此将所有内容强制在单个页面上。

如果您仍然遇到此问题,您可能应该检查所有报告项的 PageBreakAtStartPageBreakAtEnd 属性是否设置为 true。

【讨论】:

    猜你喜欢
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-19
    相关资源
    最近更新 更多