Empty data on JasperReport when adding a chart

I undestand that I need a report band for every report element. This works great on tables. When i bind the table to the dataset expresion the extra null data goes away but this is not the case when i add a chart.
i have attached two reports
CategoryTableAndChart is generating null data

image

Reports.zip (22.0 KB)

Hi,

I’m not a big expert in Jasper Reports, but it seems that Details band is printed as many times as a number of records in your dataset.

If you need to print chart only once you can either move it from Details to Summary section in your JRXML template, or use the $V{REPORT_COUNT}==1 value for the Print when expression field:

Screenshot 2022-10-07 at 09.11.11

Jasper report that worked for me: CategoryTableAndChart1.jrxml.zip (2.0 KB)

1 Like

Thank you very much, your input is very useful.