我如何让我的用户能够决定页面的布局(边距、横向/纵向、纸张大小)?是否有办法使用报表参数配置报表布局?
我的主要兴趣是能够在信函和法律之间做出选择。
另一种方法是每个报告构建两个版本,但我讨厌重复。
据我所知,如果您正在使用ReportViewer,以下是如何操作:
reportViewer.SetPageSettings(new PageSettings() { Landscape = false, Margins = new Margins() { Left = 1, Top = 1, Right = 1, Bottom = 1, }, PaperSize = new PaperSize() { Height = 1100, Width = 850, RawKind = (int)PaperKind.Letter, } });
希望这有帮助。。