问题描述
尊敬的读者, Dear Readers, 我使用报表查看器来创建一个包含来自数据库的显示记录的报表. I use Report Viewer to create a report with display records from a database. 每行要显示很多数据,但是页边距设置限制了我. I have a lot of data to display for each line, but the margin settings are limiting me. 如果我进入``报表查看器''(运行时)中的``页面设置''选项卡,则可以将页边距设置为1(左右),这样可以很好地显示我的全行. If I go to the Page Setup tab in Report viewer(Run time), I can set the margins to 1 (left and right) , and it displays my full line nicely. 如何在加载表单时以编程方式将页边距设置为1? How can I programatically set the margins to 1 during loading of the form? 有趣的是,如果我进入页面设置,页边距显示为 Also interesting is that if I go into Page Setup, the margins are displayed as 9.8(左右).如果我退出页面设置,然后返回页面设置,则 9.8 (left and right). If I go out of Page Setup, and back in to Page Setup, the 利润率现在是3.9.每次我进出页面设置时,只要不更改任何内容,边距就会自动减少,直到为0. margins now are 3.9. Every time I go in and out of Page setup, without changing anything, the margins are automatically reduced, untill it is 0. 这种正确的行为吗? 谢谢 如何以编程方式设置页面? How to set up the page programatically? 并且,有什么方法可以制作打印版式"吗?默认为活动状态?我的问题是... ReportView在打印布局"显示时会以不同的方式显示报告是开/关. And, is there any way to make "Print Layout" active bydefault? My problem here is...ReportView is showing the report differently when "Print Layout" is on/off. 任何回应,欢迎提出想法 Any responses, ideas are welcome 谢谢..! 这篇关于在ReportViewer中设置边距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!推荐答案