Summary

In this chapter, we learned the different ways we can create database reports and how to use the <queryString> JRXML element to embed SQL queries in a report template.

Additionally, we saw how to populate an instance of JRResultSetDataSource with data from a result set and use it to fill a report. We also covered how to declare report fields to access data from individual columns in the result set of the query used to fill the report. Finally, we learned how to generate reports that are displayed both in the user's web browser and in PDF format.

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.