热心的网友<寒羽枫>帮忙解决水晶报表打印纸张问题
寒羽枫 18:40:11
TO FLY C# :在 CrystalReportViewer 中有 BestFitPage 与 SeparatePages 属性可以设置。还有就是你可以通过 cs 来控制CrystalReportViewer的纸张。如下:
ReportDocument rpt = new ReportDocument();
rpt.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4;//A4 纸张
rpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape;//横向打印
CrystalDecisions.Shared.PageMargins margins = rpt.PrintOptions.PageMargins;
margins.bottomMargin = 450; //下空白
margins.leftMargin = 350;//左空白
margins.rightMargin = 350;//右空白
margins.topMargin = 350;//上空白
rpt.PrintOptions.ApplyPageMargins(margins);
寒羽枫 18:41:29
不好意思中间漏了一项
rpt.Load(Server.MapPath("../report/Chi.rpt"));
寒羽枫19:14:19
rpt.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperStatement;
rpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape;
以上设置是半刀纸,也就是 A4的一半
FLY C# 19:18:44
非常感谢 搞定了!