Page 1 of 1

Recursive Lists in Business Objects

Posted: Mon May 17, 2021 8:54 am
by MartinRoth
Hi. I have 2 classes like this:

class Location {
String Name;
List<Location> Children;
List<Equipment> Stuff;
}

class Equipment {
String Name;
List<Equipment> Children;
}

I'd like to see something like this in a Report:

Location A
Equipment A-1
Location A-A
Equipment A-A-1
Equipment A-A-2
Equipment A-A-2-1
Location A-B
Location B

There should be no limit on the depth of the recursion.
How should I build a report like this?

TIA
Martin

Re: Recursive Lists in Business Objects

Posted: Mon May 17, 2021 11:28 am
by Lech Kulikowski
Hello,

You can create the master-detail report:
https://www.stimulsoft.com/en/documenta ... report.htm

Thank you.

Re: Recursive Lists in Business Objects

Posted: Mon May 17, 2021 12:40 pm
by MartinRoth
Hi Lech

Thanks for the reply. I'm afraid I don't see how a master-detail report can help with recursive business objects. Would you care to elaborate or even to provide a sample?

TIA
Martin

Re: Recursive Lists in Business Objects

Posted: Thu May 27, 2021 10:45 am
by Lech Kulikowski
Hello,

Please check the following sample:
https://www.stimulsoft.com/en/samples/w ... the-report

Thank you.

Re: Recursive Lists in Business Objects

Posted: Thu May 27, 2021 2:02 pm
by MartinRoth
Hi Lech,

This doesn't help me at all. I know how to handle simple business objects (like that employee class in the sample mentioned above). My question was about recursive hierarchical lists, i.e. a class has a property with a list of the same class. Can you handle this and if yes, how?

TIA
Martin

Re: Recursive Lists in Business Objects

Posted: Fri May 28, 2021 6:39 am
by Lech Kulikowski
Hello Martin,

Please send us a sample with test data that you have a problem with, we will prepare a sample for you.

Thank you.