Integrating JasperReports with Vaadin
JasperReports
is an open-source reporting engine to produce reports that can be rendered in a variety of formats, such as HTML, PDF, Microsoft Excel, ODT (OpenOffice), and others. Typically, reports are designed in a visual editor (iReport Designer) or XML files (JRXML). The design is compiled into a Jasper file (*.jasper
), filled with data, and exported to the desired format.
DynamicJasper
and DynamicReports
are two open-source libraries that abstract away the JRXML format and provide APIs to design reports in Java. This is a good match for the philosophy of the Vaadin Framework which allows you to implement HTML-based web applications in Java. In this chapter, we'll use DynamicJasper
, but the concepts are similar if you prefer DynamicReports
. Some of the concepts can be also used if you plan to design reports in JRXML files directly or through the iReport Designer tool.
You can include DynamicJasper
by adding the following dependency to your pom.xml
...