C# 如何管理水晶报表中的页面大小和边距?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12360581/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to manage page size and margin in crystal report?
提问by haansi
I am new to crystal reports and using crystal report with .Net (WinForm / Visual Studio 2010).
我是水晶报表的新手,并在 .Net (WinForm / Visual Studio 2010) 中使用水晶报表。
I was thinking what would be the way to setup page size and top, bottom, left and right margins in report. I tried to look options but couldn't get it. Please guide me.
我在想在报告中设置页面大小和顶部、底部、左侧和右侧边距的方法是什么。我试图寻找选项,但无法得到它。请指导我。
回答by Hariharan Anbazhagan
If you use Crystal Reportsto design your report, Page size and Margins can be edited by Page Setup. Right Clickon your report select Page Setup. You'll get a window as shown below. 
Here you can edit the page size and margins...
如果您使用Crystal Reports来设计您的报告,则页面设置可以编辑页面大小和边距。右键单击您的报告,选择Page Setup。你会得到一个如下图所示的窗口。
在这里您可以编辑页面大小和边距...
If you use VS2010to design your report, follow the below steps
如果您使用VS2010来设计您的报告,请按照以下步骤操作


For Margins Open Page Setup 


对于边距打开页面设置 
Hope this helps !!
希望这可以帮助 !!
回答by Massood Khaari
And to change them programmatically:
并以编程方式更改它们:
yourReportObject.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4;
yourReportObject.PrintOptions.ApplyPageMargins(new CrystalDecisions.Shared.PageMargins(0, 0, 0, 0));

