Looking for a way to center a report within the .NET Crystal Reports viewer control when the containing form is maximized.
在最大化包含表单时,寻找一种在.NET Crystal Reports查看器控件中居中报表的方法。
3 个解决方案
#1
I thought it centers the report by default? I put the crv onto a form and set the dock to fill. In fact, I don't know how to get it to not center the report.
我认为它默认以报告为中心?我把crv放在一个表格上并设置码头填充。事实上,我不知道如何让它不以报告为中心。
#2
On the DOCK property of the viewer control, set it to FILL.
在查看器控件的DOCK属性上,将其设置为FILL。
#3
Set the ReportViewer control DOCK property to FILL and set the Maximized property of the form programmatically after calling the Show method. If it is set in the design time it's not working. See below my sample code.
将ReportViewer控件DOCK属性设置为FILL,并在调用Show方法后以编程方式设置窗体的Maximized属性。如果在设计时间设置它不起作用。请参阅下面的示例代码。
Me.rptViewer.Zoom(100)
Me.rptViewer.Show()
Me.Show()
Me.WindowState = FormWindowState.Maximized
#1
I thought it centers the report by default? I put the crv onto a form and set the dock to fill. In fact, I don't know how to get it to not center the report.
我认为它默认以报告为中心?我把crv放在一个表格上并设置码头填充。事实上,我不知道如何让它不以报告为中心。
#2
On the DOCK property of the viewer control, set it to FILL.
在查看器控件的DOCK属性上,将其设置为FILL。
#3
Set the ReportViewer control DOCK property to FILL and set the Maximized property of the form programmatically after calling the Show method. If it is set in the design time it's not working. See below my sample code.
将ReportViewer控件DOCK属性设置为FILL,并在调用Show方法后以编程方式设置窗体的Maximized属性。如果在设计时间设置它不起作用。请参阅下面的示例代码。
Me.rptViewer.Zoom(100)
Me.rptViewer.Show()
Me.Show()
Me.WindowState = FormWindowState.Maximized