Recursive Lists in Business Objects

Stimulsoft Reports.WEB discussion
Post Reply
MartinRoth
Posts: 10
Joined: Mon Sep 04, 2017 7:44 am

Recursive Lists in Business Objects

Post 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
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Recursive Lists in Business Objects

Post by Lech Kulikowski »

Hello,

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

Thank you.
MartinRoth
Posts: 10
Joined: Mon Sep 04, 2017 7:44 am

Re: Recursive Lists in Business Objects

Post 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
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Recursive Lists in Business Objects

Post by Lech Kulikowski »

Hello,

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

Thank you.
MartinRoth
Posts: 10
Joined: Mon Sep 04, 2017 7:44 am

Re: Recursive Lists in Business Objects

Post 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
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Recursive Lists in Business Objects

Post 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.
Post Reply