JasperReports Library is the world's most popular open source business intelligence and reporting engine.
It is entirely written in Java and it is able to use data coming from any kind of data source and produce pixel-perfect documents that can be viewed, printed or exported in a variety of document formats including HTML, PDF, Excel, OpenOffice and Word.
The project is also available at:
https://github.com/TIBCOSoftware/jasperreports
Jaspersoft Studio is the open source report designer for the JasperReports Library.
...
Java API for reports and crosstab reports (or pivot tables ) with groupings, subtotals, data aggregation. Simple, fast and easy way to construct reports in various formats : HTML, XML, Excel, PDF, SVG.
The reports can be used programatically or configured using spring framework (declaratively).
Java class library for generating reports. XML-based templates provide flexible reporting and printing functionality using data from multiple sources and supports output to display devices, printers, PDF, Excel, HTML, XHTML, PlainText, XML and CSV files.