Jaspersoft 6.1 HTML 5 chart fails, when dataset returns zero rows.

Hello, 

in the new jaspersoft 6.1 it is not possible to view HTML 5 charts, if the corresponding data set returns 0 rows.

In that case the loading popup of the JasperReport Server doesn't disappear because of an JavaScript error.

Uncaught TypeError: Cannot read property 'length' of undefined

These reports were working in JS 6.0. 

Is there any "No Data" porperty for charts? Or is it bug in JS 6.1?

Best regards

Areport's picture
118
Joined: Aug 2 2011 - 6:41am
Last seen: 3 years 10 months ago

I am having this problem as well in jasper studio 6.1

srang - 7 years 7 months ago

facing the same issue..seems to be a bug in jasper 6.1..any work around for it??

nidsbagaria - 7 years 6 months ago

Hopefully it is fixed in the next release.

Areport - 7 years 6 months ago
show 1 more...

The below print when expression worked for me.

joseng62 - 6 years 8 months ago

3 Answers:

This is solved by adding following print when expression to charts:

($V{REPORT_COUNT} > new Integer(0))

nidsbagaria's picture
Joined: Jan 22 2015 - 2:02am
Last seen: 6 years 11 months ago

i have the same problem in Studio 6.1

adding the above code to Print When did not fix it

beekerc69's picture
463
Joined: Mar 6 2015 - 9:38pm
Last seen: 6 years 2 weeks ago

Solution for the Issue "when dataset returns zero rows."

Hi Everyone , There is a Issue with Jasper HTML 5 chart in  Clarity 14.3 version .
ISSUE:-  When you run a Report  which has PIE Chart but the select Project dosent has Data in it , it means PIE chart has Zero Records then The Report will continously show "Please Wait" Loading Window, this wont stop untill you click on cancel.

Solution for this Issue :-

1)Use your HTML 5 Chart in sub report

2) Put some Print when Expression on the Report ( like ex:- $F{ProjectID} !=null ) , so when there are no records your PIE wont appear in the report

I have faced the Issue in 14.3 , after Implementing above Solution to my PIE Chart , now its working for me

Hope this helps all.

Regards,
Santosh
 

santosh.audi19's picture
Joined: Sep 9 2015 - 9:58am
Last seen: 2 years 4 days ago
Feedback