JasperReports is an open source reporting tool that can be used in all Java applications from desktop to web applications. This tag should always be applied to all question related to this framework, if the question is also related to usage of a specific IDE (jaspersoft-studio or ireport) add the correct one. Only if your question contains back-end code in java/php etc you need to add those as additional tags.
JasperReports
The JasperReports library is an open source reporting application programming interface (API) written in Java. JasperReports can export to screen, printer, PDF, HTML, Microsoft Excel, RTF, ODT, comma-separated values (CSV), and XML formats.
The JasperReports library is used by the main integrated development environments (IDEs) for authoring reports templates: iReport and Jaspersoft Studio, with Jaspersoft Studio having superseded iReport.
How JasperReports Works
There is often some confusion about the relationship between JasperReports, Jaspersoft Studio/iReport, .jrxml
files, and .jasper
files. Generating a report takes the following general steps:
- Typically, reports are designed using iReport or Jaspersoft Studio.
- iReport/Jaspersoft Studio saves the source code for reports in XML format with a
.jrxml
file extension. - Either iReport/Jaspersoft Studio or JasperReports compiles the
.jrxml
files to.jasper
files. - The
.jasper
files are loaded by JasperReports. - JasperReports fills the compiled report with data from a given data source (such as a database result set).
- JasperReports exports the completed report to a specified document format.
Report Design
Jaspersoft Studio is the official design client for JasperReports. It is a stand alone product based on Eclipse and is also available as an Eclipse plugin.
Jaspersoft Studio v5.5.0 has superseded the iReport report designer. You can still use iReport but be aware that the project is now in maintainence-only mode. Follow the Designing a Report guide for an example on how to create a report.
FAQ
- How to call JasperReport files from Java code?
- How do I compile .jrxml to get .jasper?
- How to use relative paths in JasperReports?