JSON from URL Timeout?

Stimulsoft Reports.WEB discussion
Post Reply
mikemaat
Posts: 9
Joined: Mon Jul 12, 2021 9:58 pm

JSON from URL Timeout?

Post by mikemaat »

We have a report that has a json datasource. The datasource points at an API endpoint URL that provides the JSON. Unfortunately, the api has to do some heavy lifting, and the json itself can take over a minute to return.

With smaller result sets, the report runs fine, but if we call the API with parameters that result in a large data set (over a minute to return) then the report fails to load the data. We are assuming that it must be timing out.

Is there a setting/property somewhere we can set for a longer timeout when querying external URLs for datasource data?
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: JSON from URL Timeout?

Post by Lech Kulikowski »

Hello,

Please try to use the RequestTimeout property.
https://www.stimulsoft.com/en/documenta ... imeout.htm

Thank you.
mikemaat
Posts: 9
Joined: Mon Jul 12, 2021 9:58 pm

Re: JSON from URL Timeout?

Post by mikemaat »

That had no effect. The report still loads with no data (but will load with data if a smaller/quicker json dataset is called instead).

Also, as a secondary issue, I'm trying to also render the report in the background without a viewer, so in that case there is no StiWebViewer to set a RequestTimeout on. In that case im using await report.RenderAsync();
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: JSON from URL Timeout?

Post by Lech Kulikowski »

Hello,

There are no timeout options for JSON data sources.

As a way, you can retrieve data in your code and then provide to the report as DataSet with the RegData() method.

Thank you.
Post Reply