Thursday, December 10, 2009

Reporting with "Jasper Reports"

Given simple steps shall be enough to generate reports with jasper-reports.

1. Add jasper-reports.jar & itext.jar to your application's lib folder / classpath.

2. Compose the report template file (.jrxml). You can use WYSIWYG editors like iReport or JasperAssistant plugin for eclipse to generate them.

3. Compile the .jrxml file to .jasper files with the editor or with the utility class JasperCompileManager

4. With the utility class JasperRunManager generate reports to your repository
With the utility class JasperPrintManager print the report to the configured printer.