Page 1 of 2

Nested levels in business objects

Posted: Mon Dec 10, 2012 2:38 pm
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

Re: Nested levels in business objects

Posted: Tue Dec 11, 2012 11:56 am
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.

Re: Nested levels in business objects

Posted: Tue Dec 11, 2012 12:25 pm
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.

Re: Nested levels in business objects

Posted: Wed Dec 12, 2012 8:54 am
by HighAley
Hello.

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

Thank you.

Re: Nested levels in business objects

Posted: Wed Dec 12, 2012 1:00 pm
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.

Re: Nested levels in business objects

Posted: Thu Dec 13, 2012 12:03 pm
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.

Re: Nested levels in business objects

Posted: Thu Dec 13, 2012 12:53 pm
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.

Re: Nested levels in business objects

Posted: Fri Dec 14, 2012 5:40 am
by HighAley
Hello.

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

Thank you.

Re: Nested levels in business objects

Posted: Mon Feb 18, 2013 12:47 pm
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()

Re: Nested levels in business objects

Posted: Tue Feb 19, 2013 8:16 am
by HighAley
Hello.

Please, try to use workaround from the this post.

Thank you.