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 file:

<dependency>
<groupId>ar.com.fdvs</groupId>
<artifactId>DynamicJasper</artifactId>
<version>5.1.0</version>
</dependency>

In order to export to Microsoft Office formats, you need to add Apache POI as a dependency:

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
</dependency>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset