Hibernate custom connection
I have some data in regular database tables, and some data are read from files. I want to leverage reporting tools facilities, so i would like "present" to the report tool my data as were they all were read from the database. Is there 开发者_如何学Goa way to achieve this?
Yes. Read the data, from anywhere you want, in your application. Then build a list of objects obeying the JavaBeans conventions, and use a JRBeanCollectionDataSource
. Jasper will iterate through the list of beans, and the field $F{foo}
will have the value of the result of getFoo()
on the current bean.
精彩评论