Create Business Object Child in code

Stimulsoft Reports.NET discussion
Post Reply
User avatar
ProIT
Posts: 28
Joined: Thu Oct 17, 2013 8:10 am
Location: Muttenz

Create Business Object Child in code

Post by ProIT »

Hi there

I have a Business object like this:

Code: Select all

public String CampaignName{ get; set; }
public String ProjectName{ get; set; }
...
public List<Address> CampaignAddresses { get; set; }
I add this Business object to the designer like this:

Code: Select all

report.RegBusinessObject("Campaign", campaigns);
To get the Business Objects for CampaignAddresses I then need to select "New Business Object" in the designer.

How can I add this list of addresses in code to my business objects? I already searched in your forum but didn't find a solution.

Thank you for your help!
Mike Hachen
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Create Business Object Child in code

Post by Alex K. »

Hello,

Please try to use the following code:

Code: Select all

report.Dictionary.SynchronizeBusinessObject(2);
Thank you.
User avatar
ProIT
Posts: 28
Joined: Thu Oct 17, 2013 8:10 am
Location: Muttenz

Re: Create Business Object Child in code

Post by ProIT »

Hi Aleksey

To say it with Homer's words: D'oh!!

Sometimes it's so simple...

Thank you for your help!
Mike Hachen
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Create Business Object Child in code

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.
Post Reply