Page 1 of 1

REST OData nested objects

Posted: Fri May 14, 2021 4:13 pm
by dvv153m
Does the Stimulsoft designer know how to work with a REST OData data source with nested objects?

Re: REST OData nested objects

Posted: Mon May 17, 2021 10:12 am
by Lech Kulikowski
Hello,

All nested objects will be presented as separate tables with relations:
https://www.stimulsoft.com/en/documenta ... report.htm

Thank you.

Re: REST OData nested objects

Posted: Tue May 18, 2021 5:52 am
by dvv153m
My OData service is http://95.213.239.58:12118/odata-api
returns a collection of City objects. Within each City object, there is a nested collection of Street objects.
Type description here http://95.213.239.58:12118/odata-api/$metadata
When I add the OData service in the stimulsoft designer, a separate table for Street objects is not created. Is that how it should be?
Image
https://ibb.co/82jtc3L

Re: REST OData nested objects

Posted: Tue May 18, 2021 10:25 am
by dvv153m
Solved a problem.
Now a plate is automatically created for the nested object in the StimulSoft designer.
It was necessary to mark the nested object as a navigation property.
In the place where the Edmx model was described it was written like this
edmBuilder.EntitySet <City> ("ReportOData");
but it was necessary to add a description of the navigation property like this
var city = edmBuilder.EntitySet <City> ("ReportOData");
city.HasManyBinding (c => c.Streets, "Streets");

Re: REST OData nested objects

Posted: Wed May 19, 2021 11:29 am
by Lech Kulikowski
Hello,

Thank you for the information.

Re: REST OData nested objects

Posted: Fri Jul 07, 2023 1:15 pm
by joshuadmatthews
I am using an API I don't control and the Stimulsoft JS version, and apparently the API isn't using this method to describe the nested objects because I'm not seeing a different table created. Is there a way I can manually fix things up within the report designer so I can access this nested data?

Re: REST OData nested objects

Posted: Mon Jul 10, 2023 6:06 pm
by Lech Kulikowski
Hello,

You can add all your sources as separate flat tables and then add relations between nested objects.

Thank you.