Relations between Business Objects

Stimulsoft Reports.BLAZOR discussion
Post Reply
charlvdb
Posts: 12
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Relations between Business Objects

Post 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
Attachments
RSAForm26.mrt
(108.32 KiB) Downloaded 197 times
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Relations between Business Objects

Post 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.
charlvdb
Posts: 12
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Re: Relations between Business Objects

Post 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.
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Relations between Business Objects

Post by Max Shamanov »

Hello,

Please check the attached project.

Thank you.
Attachments
Samples-Blazor-Server.zip
(35.44 KiB) Downloaded 208 times
charlvdb
Posts: 12
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Re: Relations between Business Objects

Post by charlvdb »

Thanks, managed to resolve the issue by doing some rework in the code-behind and relations were set up there as well.
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Relations between Business Objects

Post by Max Shamanov »

Hello,

You are welcome!
Post Reply