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 a way to achieve this?
Share
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 ofgetFoo()on the current bean.