JasperReports Server: How to fix error if no data available in report?

1.4k Views Asked by At

I have created a report in Jaspersoft Studio with Domain as Datasource and some parameters (fromDate and toDate) to make my report dynamic based on DATE criteria and published in JasperReports Server which works fine - If data is there report loads based on date parameters and If data not available shows "No data found on selected criteria".

But while loading the report in my application using visualize.js, If data is there report loads based on the selected date parameters, But If data not there, the page keep on loading with an error in console "Uncaught TypeError: Cannot read property 'length' of undefined - in visualize.js:2028"

For More Information

I have already selected "No-data section" for "When no data" option in report properties and edited nodata field with my static message, which loads fine in Jasperserver but not in my application through visualize js.

1

There are 1 best solutions below

1
On

You can avoid errors by setting in JasperSoftStudio report property "When no data type"= "All sections No Detail"