Getting error with Recursive business object

Stimulsoft Reports.WEB discussion
Post Reply
jkoo
Posts: 64
Joined: Fri Aug 19, 2011 8:08 pm

Getting error with Recursive business object

Post by jkoo »

If I'm using Recurisve business object,
that is, if Employee has Manager property of Employee type in the below code,

I got the error in the preview which tells

'ManagerBuisinessObject' member names cannot be the same as their enclosing type

Code: Select all

public class Employee
{
     ...
     public Employee Manager { get; set; }
}
report.RegBusinessObjects("Employee", new List());
report.Dictionary.SynchronizeBusinessObjects(2)

Is there any resolution?

Thanks
Attachments
1286.BusinessObjectsWeb3.zip
(56.37 KiB) Downloaded 218 times
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Getting error with Recursive business object

Post by Andrew »

Hello,

Unfortunately, at this moment there is no workaround for this problem.
We plan to start working on this issue after the release of 2011.2.

Thank you.
jkoo
Posts: 64
Joined: Fri Aug 19, 2011 8:08 pm

Getting error with Recursive business object

Post by jkoo »

Hi

I'd like to remind you this issue.
I hope you're working it.

Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Getting error with Recursive business object

Post by Alex K. »

Hello,

Unfortunately, we have not yet worked on this problem. We will try to fix it in the nearest future.

Thank you.
Daniel Peinhopf
Posts: 8
Joined: Tue Aug 20, 2013 5:26 am

Re: Getting error with Recursive business object

Post by Daniel Peinhopf »

I have the same problem at the moment but i create the dictionary with a simple recursive loop that creates the columns and business objects.
Is there a way to completely avoid using the dictionary and access the properties of the business object parameter directly?

For example in a text box i want to just write "{Employee.Address.Street}
And then register the Employee object: RegBusinessObject("Employee", myEmployee)
Does this work without using the dictionary just by reflection?

And what if the Employee has a Property "Documents" which is an IEnumerable<Document>.
Would it be possible to use this Property as the data source for a Data band?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Getting error with Recursive business object

Post by HighAley »

Hello.

We don't see that you use recursive business objects.
Do you have any problem with our tool or you don't know how to use business objects?
In first case, please, send us more information about your issue.
In second try to watch our tutorial videos

Thank you.
Post Reply