0

我在 asp.net 中有一个刺激报告,我需要在运行时动态更改面板的位置。
我的问题是如何在我的代码中访问面板对象?我需要更改此控件的顶部属性

4

2 回答 2

0

您可以使用以下代码设置 Panel 的 Top 属性:

(report.GetComponentByName("Panel1") as StiPanel).Top = 15;
于 2013-05-30T06:13:14.563 回答
0

您应该先加载报告,然后直接转换对象,然后在调用 show() 之前编译报告

  report.Load(Application.StartupPath & "report.mrt")  
  DirectCast(report.GetComponentByName("Image1"), StiImage).Stretch = False
  report.Compile()
  report.RegData(MyDataSet)
  report.Show()
于 2014-08-17T04:55:30.360 回答