Business Objects and multiple one to many relations grouping

Stimulsoft Reports.WPF discussion
Post Reply
jcc_colin
Posts: 9
Joined: Wed Aug 08, 2012 11:34 am

Business Objects and multiple one to many relations grouping

Post by jcc_colin »

We use Stimulsoft combined with business objects and this has been working very well for us, but now we have a situation where I'm not sure if it's possible to do this in Stimulsoft or where we need to 'flatten' our business objects.

Say we have a business object named Customer. This customer has a list of Address objects and a list of EmailAddress objects, so the class is as follows:

Customer
- IList<Address> AddressList
- IList<EmailAddress> EmailAddressList

What we would like to achieve is that if a certain customer has two addresses and two email addresses, that we can show a report with four lines as follows:

John Smith - Address 1 - Email address 1
John Smith - Address 1 - Email address 2
John Smith - Address 2 - Email address 1
John Smith - Address 2 - Email address 2

Is this possible if the resulting data set only contains one business object with in each of the lists two 'sub business objects' that are both connected to the root object?

I've tried adding multiple group header bands, but it seems like I can only get it to show either the two different addresses or the two different email addresses. I never get more than two lines in this situation.

The alternative would be to flatten the business object on our side and name it like CustomerAddressEmailAddress of something, but it would not be ideal. :)

Thanks in advance.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Business Objects and multiple one to many relations grou

Post by HighAley »

Hello.

Sorry, for delay with response. This task is not usual.
We need some additional time to find a solution.

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Business Objects and multiple one to many relations grou

Post by HighAley »

Hello.

Unfortunately, there is no easy way to create such report using your data.
Please, change structure of your business object.
You could try to use LINQ to join data as you need.

Thank you.
Post Reply