Page 1 of 1

Create Business Object Child in code

Posted: Thu Oct 17, 2013 9:28 am
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

Re: Create Business Object Child in code

Posted: Thu Oct 17, 2013 12:11 pm
by Alex K.
Hello,

Please try to use the following code:

Code: Select all

report.Dictionary.SynchronizeBusinessObject(2);
Thank you.

Re: Create Business Object Child in code

Posted: Thu Oct 17, 2013 12:52 pm
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

Re: Create Business Object Child in code

Posted: Fri Oct 18, 2013 7:34 am
by Alex K.
Hello,

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