views:

9

answers:

0

I want to create a report of "students" in Jasper Reports.
I am using a collection of "Student" Java Beans, creating a table with the student name, address and age.
I want to add a pie chart to the end of the report, showing the distribution of ages among students. E.g. 15% below age 20, 50% ages 20-25 and 35% above 25.

I managed to accomplish this using the SQL data source by using a new dataset with a different query to the DB.
I can't use SQL in my case. I have to use Java Beans.
I couldn't find a way to have a different Java Beans dataset for the chart.

Do you know of a way to add a chart to a report based on attributes I can programatically calculate from my Java Beans collection?

Thanks