Page 1 of 1

OData datasource not working properly

Posted: Thu Nov 10, 2022 2:27 pm
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

Re: OData datasource not working properly

Posted: Fri Nov 11, 2022 10:13 am
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.

Re: OData datasource not working properly

Posted: Mon Nov 21, 2022 8:18 am
by Yannick
Thank you
I have sent the request to the support

Re: OData datasource not working properly

Posted: Mon Nov 21, 2022 10:46 am
by Lech Kulikowski
Hello,

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