Nested levels in business objects

Stimulsoft Reports.WPF discussion
kro
Posts: 27
Joined: Fri Oct 19, 2012 11:25 am

Nested levels in business objects

Post by kro »

Hello,

I have a problem with business objects with several (more than 2) nested levels. Whenever I include the data from the "deepest" levels in a data band, the result is displayed incorrectly - the first row of data is repeated for every row of output.

I found that there is already a topic about a similar problem: http://forum.stimulsoft.com/viewtopic.php?f=12&t=5372. I have tried to use the SynchronizeBusinessObjects method, but it didn't help. The only thing that works is placing the nested data on a separate data band (that is, nesting data bands). However, this solution is somewhat difficult to use in my project (because there is a lot more nested levels in my objects), so I am looking for another one. I would appreciate any suggestions.

I attach a sample report that reproduces the issue and a small project that creates the business objects and loads them into the report.com/viewtopic
Attachments
StimulsoftWpfApplication - nested levels.zip
(2.3 MiB) Downloaded 997 times
Report.mrt
(24.46 KiB) Downloaded 726 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Nested levels in business objects

Post by HighAley »

Hello.

We know about this issue. Due to specific of the business objects we still didn't implement the universal method for BO which will be able to get 3rd nested level and higher.
As a workaround we could advise you to use master-detailed report to reach such levels.
Please, look at the attached report template.
Report.mrt
(11.92 KiB) Downloaded 832 times
Thank you.
kro
Posts: 27
Joined: Fri Oct 19, 2012 11:25 am

Re: Nested levels in business objects

Post by kro »

Master-detail reports are a good workaround in a general case, but in my project they will not help much. Anyway, thank you for your reply. I am glad to know at least that this is how it works with business objects.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Nested levels in business objects

Post by HighAley »

Hello.

Could you describe your problem on your project example?
We'll try to find a solution of your problem.

Thank you.
kro
Posts: 27
Joined: Fri Oct 19, 2012 11:25 am

Re: Nested levels in business objects

Post by kro »

Well, skipping all the unnecessary details: I have business objects with 5-8 levels of nesting and about 50 fields of data that read from all (or almost all) of those levels. According to some specified parameters, I print a selected subset of these fields as one row in a table. What I mean to say is: each row of the table may contain data from all of the nested levels.

I suppose it is possible to do this using multiple data bands in master-detail relations, but it will be very inconvenient, especially because I have a number of reports with such objects. It might be better to solve the problem by providing a wrapper class for the business object to make data access easier. I think this is the direction I will take.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Nested levels in business objects

Post by HighAley »

Hello.

Thank you for explanation. Now it's more clear.
You could try also to register your Business Object with RegData method. Then you should get Data Sources with relations. But it depends on Business Objects and may not work.

Thank you.
kro
Posts: 27
Joined: Fri Oct 19, 2012 11:25 am

Re: Nested levels in business objects

Post by kro »

Using RegData might not work in my case. But it is a nice suggestion and I will keep it in mind.

Thank you again for all your help.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Nested levels in business objects

Post by HighAley »

Hello.

We are very glad to help you.
Let us know if you will need any additional help.

Thank you.
ramburle
Posts: 4
Joined: Mon Feb 18, 2013 10:42 am

Re: Nested levels in business objects

Post by ramburle »

We faced the same problem when we registered Entityset (IQueryable) as Business Objects. However, when the entityset is converted to List and registered, it worked fine.

DS.EntitySet1.ToList()
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Nested levels in business objects

Post by HighAley »

Hello.

Please, try to use workaround from the this post.

Thank you.
Post Reply