OData datasource not working properly

Stimulsoft Reports.ANGULAR discussion
Post Reply
Yannick
Posts: 3
Joined: Mon Jun 20, 2022 3:08 pm

OData datasource not working properly

Post by Yannick »

Hello,

1st problem :
I am using an OData datasource which targets an OData server with forced server side paging.
The OData server returns something like this :
{
"@odata.context":"http://localhost:24367/$metadata#TestData","value":[
{ "Id":9,"Name":"Manish","Role":"QA" },
{ "Id":10,"Name":"Manisha","Role":"QA" },
{ "Id":11,"Name":"Urmi","Role":"QA" },
{ "Id":12,"Name":"Bharat","Role":"QA" },
{"Id":13,"Name":"Varun","Role":"QA" } ,
...
],"@odata.nextLink":"http://localhost:24367/TestData?$filter=...&$skip=2000"
}

The problem is that Stimulsoft just get the first page and ignores @odata.nextlink and does not get others pages of data. Thus, the report prints incomplete data.
I cannot change server side paging setting as I don't have control over the OData server.
Looking in the source code of Stimulsoft, I think a small correction would do the job : in the class StiODataProvider you could read the NextPageLink with ((ODataResourceSet)oDataReader.Item).NextPageLink.AbsoluteUri right after oDataReader.Read() and loop to fill the DataTable with the data of the next request and do that until the NextPageLink is null

2nd problem :
When I add a filter in my report, whether dynamic or not, the OData request made by Stimulsoft does not contain the filter. Instead, the filter is applied on the Stimulsoft server which leads up to poor performance since the OData request returns thousands of data instead of just a few.
Would it be possible to modify the Stimulsoft source code to apply the filter on the OData request ?

Thanks
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: OData datasource not working properly

Post by Lech Kulikowski »

Hello,

> 1st problem :

Please send us your request on support@stimulsoft.com

> 2nd problem :

Send filters to the data query is available only for SQL data sources. For the OData source that feature is not supported.

Thank you.
Yannick
Posts: 3
Joined: Mon Jun 20, 2022 3:08 pm

Re: OData datasource not working properly

Post by Yannick »

Thank you
I have sent the request to the support
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: OData datasource not working properly

Post by Lech Kulikowski »

Hello,

Ok. We will check it and will reply to you.
Post Reply