各位哥姐们,winform中 怎么通过代码设置 ReportViewer 为打印布局模式啊?叩谢。分不多

解决方案 »

  1.   

    水晶报表的打印布局是通过ReportViewer 的ReportDocument对象的PrintOptions属性设定的
    可以在ReportViewer 绑定报表前设定好
      

  2.   

      this.reportViewer1.RefreshReport();
                     //设置打印布局模式,显示物理页面大小
                    this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
              
                     //缩放模式为百分比,以100%方式显示
                     this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
                     this.reportViewer1.ZoomPercent = 100;