Page 1 of 1

Get component of StiDataBand

Posted: Thu Jan 19, 2023 10:30 am
by commit.sim
Hi,
for getting all report component, programmatically, i can using this tecnique:
//good code
var components = Report.GetComponents().ToList();
but, I would need to get all the components inside specific StiDataBound. Something like this:
//broken code
var components = Report.GetComponentByName("DataBand1").GetComponents().ToList()
How do you get this? Thanks in advice.

Re: Get component of StiDataBand

Posted: Thu Jan 19, 2023 11:21 am
by Lech Kulikowski
Hello,

You can use the following code:

Code: Select all

var databand = report.GetComponentByName("DataBand1") as StiDataBand;
var componentsOnBand = databand.GetComponents();
Thank you.

Re: Get component of StiDataBand

Posted: Thu Jan 19, 2023 2:49 pm
by commit.sim
Easily casting it... sorry for my newbie.

Thank you :)

Re: Get component of StiDataBand

Posted: Fri Jan 20, 2023 7:29 am
by Max Shamanov
Hello,

You are Welcome!