Page 1 of 1

Relations between Business Objects

Posted: Wed Oct 12, 2022 8:39 am
by charlvdb
Hi

Is there any way to set up a relation between two Business Objects? At the moment, no fields are popping up to setup a relation

The business objects I have needs to be linked to each other via a Guid field.

See attached MRT as sample, in question.

Form26TransactionsReportData.AgreementId needs to be related to Form26AgreementReportData.AgrId

If not possible, any other ways to get this done?
Currently using Version 2022.2.2 from March 2022

Thanks

Re: Relations between Business Objects

Posted: Wed Oct 12, 2022 12:12 pm
by Max Shamanov
Hello,

You can register your business objects as a data source and then create relation between tables.
You can use the following code:

Code: Select all

//Register business object in the report template
        report.RegData("MyList", list);
Thank you.

Re: Relations between Business Objects

Posted: Wed Oct 12, 2022 2:23 pm
by charlvdb
Thanks for your response.

This is currently being used in the code:

Code: Select all

 _report.RegData(name, data);
It used to be :

Code: Select all

_report.RegBusinessObject(name, data);

This gives results, but no relations possible on the MRT.

The report generates a blank page when RegData is used, my business objects was changed to DataSource as well.

Re: Relations between Business Objects

Posted: Thu Oct 13, 2022 9:57 am
by Max Shamanov
Hello,

Please check the attached project.

Thank you.

Re: Relations between Business Objects

Posted: Wed Nov 23, 2022 5:39 am
by charlvdb
Thanks, managed to resolve the issue by doing some rework in the code-behind and relations were set up there as well.

Re: Relations between Business Objects

Posted: Wed Nov 23, 2022 8:07 am
by Max Shamanov
Hello,

You are welcome!