Summary

This chapter has given us a quick run through all the non-database datasources supported by JasperReports, including how to create our own.

We have created reports that use no external datasources by using an empty datasource. We also used instances of a class implementing java.util.Map as a datasource by taking advantage of the net.sf.jasperreports.engine.data.JRMapArrayDataSource class. We learned to use plain Java objects as datasources by employing the net.sf.jasperreports.engine.JRBeanArrayDataSource and net.sf.jasperreports.engine.JRBeanCollectionDataSource classes. Besides, we also saw the use of a Swing TableModel and an XML document as a datasource by implementing the net.sf.jasperreports.engine.data. JRTableModelDataSource and ...

Get JasperReports 3.5 for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.