I have an stimul report in asp.net and I need to change position of a panel dynamically in run time.
My question is how can I access the panel object in my code?
I need to change the top property of this control
Asked
Active
Viewed 1,251 times
0

Mehran SH
- 1
- 4
-
What panel do you want to move? – HighAley May 29 '13 at 05:02
-
I want to change stiPanel top property, but it doesn't effect in the report – Mehran SH May 29 '13 at 11:07
-
When do you want to change it? – HighAley May 29 '13 at 18:30
-
When a button is pressed, for example. I want to add it's top property step by step until right position – Mehran SH May 29 '13 at 20:40
2 Answers
0
You could set the Top property of the Panel with next code:
(report.GetComponentByName("Panel1") as StiPanel).Top = 15;

HighAley
- 1,257
- 1
- 8
- 20
-
It works but for the first time the page loads, I want the user to define it's right place – Mehran SH May 30 '13 at 08:25
-
If you want to do so in the Viewer you should use the same code and will need to render report again. – HighAley May 31 '13 at 05:59
-
-
Did you load any report template? What do you get from report.GetComponents().Count? – HighAley Feb 11 '16 at 11:36
0
You should load report first, then direct cast object, then compile report before calling show()
report.Load(Application.StartupPath & "report.mrt")
DirectCast(report.GetComponentByName("Image1"), StiImage).Stretch = False
report.Compile()
report.RegData(MyDataSet)
report.Show()

Vikrant Takkar
- 21
- 1