WinForms SSRS报表查看器控件:调整大小容器不会调整报表正文的大小
我们正在开发一个.NET 3.5 winforms应用程序,该应用程序具有SSRS报告查看器控件,以本地模式处理报告。该控件包含在tabpage控件(自定义控件,而不是.NET标准控件)中,并设置为DockStyle.Fill。
we are developing a .NET 3.5 winforms application which has an SSRS report viewer control, processing reports in local mode. The control is contained within a tabpage-control (a custom one, not the .NET standard control) and set to DockStyle.Fill.
报告正确显示。现在,如果用户调整表单大小并因此调整tabpage控件,报表查看器控件也会调整大小。顶部的工具栏延伸到整个标签页。但是,报告本身没有调整大小,留下
用户在之前的位置使用滚动条 - 如果表单的大小减小,则在可视区域之外,或者在内部而不是在右侧的sowewhere如果表格被放大,那么标签页就会显示。
The report is displayed properly. Now, if the user resizes the form and thus the tabpage control, the report viewer control resizes as well, as it should. The toolbar on top stretches over the whole tabpage. However, the report itself is not resized, leaving the user with scrollbars at the location where they were before - outside the viewable area if the size of the form was reduced, or sowewhere inside but not on the right hand-side of the tabpage if the form was enlarged.
正如我所说,报表查看器控件的工具栏调整大小正确,所以我认为这与我们的代码无关。但是,如果我将查看器控件单独放在一个表单而不是tabcontrol中,一切都运行良好。
As I said, the report viewer control's toolbar resizes properly, so I don't think that's got something to do with our code. However, if I put the viewer control in a form by itself and not into the tabcontrol, everything works well.
这让我觉得托管报表查看器控件的容器可能需要做一些形式本质上具体的事情。有没有人以前见过这种行为?
That's got me to think that maybe the container hosting the report viewer control needs to do something specific which a form does by nature. Has anyone seen this kind of behaviour before?
感谢您的帮助,
  ;
Roland
Roland,
Roland,
我们在报告正文中没有自动调整大小时遇到同样的问题。 您找到了问题的解决方案吗?
We're having the same problem with the report body not auto resizing. Did you find a solution to the problem?
-James