Designing a crosstab—a table with dynamic rows and columns

Crosstabs are special tables, in which both columns and rows have names. Crosstabs are very helpful in presenting summaries of large amounts of data. For example, a crosstab can be used to design a 12-month summary report to show monthly invoice totals for each of your customers.

Such a summary report will have customer names in the left-most column (meaning each row will belong to a unique customer) and month names in the top-most row (meaning each column will belong to a specific month). This way each cell of the crosstab will show the invoice total for a customer and for a specific month.

This recipe shows how you will use JasperReports to design such a crosstab.

Getting ready

Refer to ...

Get JasperReports 3.6 Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.