Page 1 of 1

JSON from URL Timeout?

Posted: Tue Jul 13, 2021 9:27 pm
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?

Re: JSON from URL Timeout?

Posted: Wed Jul 14, 2021 10:10 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: JSON from URL Timeout?

Posted: Thu Jul 15, 2021 10:14 pm
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();

Re: JSON from URL Timeout?

Posted: Fri Jul 16, 2021 12:50 pm
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.