views:

824

answers:

1

Hello, I'm sorry this is a little bit of a bad question since my problem is that I just don't understand which approach to take for this. I've got this hibernate database that works great and I want to use jasper reports to create reports based on the data from it. I have iReport working and connecting to the hibernate configuration and able to read fields from my queries and build a report.

However, I want to be able to have saved reports run from my application, and on certain objects, decided at runtime. I need to be able to pass my custom persistent objects to these reports at runtime and generate reports that way. so really they don't need a query themselves, they just need to know what kind of objects that they're going to get.

I see that I can give them parameters, but only raw objects, and also in iReport I can only make fields out of simple data types, but most of my values are rendered in the toString() of my objects so I'd like to just return those.

I would be incredibly appreciative if someone would explain some of these things to me. Thank you so much! Joshua

+1  A: 

I think you may need to look in http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/data/JRBeanCollectionDataSource.html

this is a data source collection of beans so that you can u load custom beans into the report as a datasource

ssmithstone
Actually that worked wonderfully for me, I now have my reports showing. However, I still have a further question of understanding I have posted to a new question. Thank you for your answer!My new question at:http://stackoverflow.com/questions/894587/understanding-jasperreports-and-jrbeancollectiondatasource
Joshua