Jasper (Sub)Reports and output formats

Albert Cervera i Areny 23 ag. 2009

Our jasper_reports module for OpenObject recently got a three of new interesting features.

The first of them eases the creation of reports to non-english speakers by translating all fields to user's language when exporting the data template. Here you can see a screenshot of partner's fields translated into Catalan. Note that the database name field is shown right after the field string.

The second one is support for XML data in subreports. It was already possible to use subreports for headers, for example, or they could access the database but providing XML data to subreports was not possible. That meant that creating an invoice report like the one provided by default was not possible without direct database access due to the need to iterate through invoice lines first and invoice taxes later in the same form. Now it's possible to create such a report using subreports and with no need of database access. One can design the tax subreport and then integrate it with the main invoice report.

Here is a screenshot of the demo partner.jrxml, which got a new subreport called subpartner.jrxml, that shows partner events. This results in the final report iterating over all partner attachments and all events! No need to program anything, and no need to join tables from the database.

The third feature I want to talk about is the possibility to configure the output format of the report. Previously, only PDF output was possible but with recent versions you can configure the document to be rendered in RTF, ODT, ODS, XLS, HTML, PDF, CSV or TXT formats. Here there are some screenshots of the sample Jasper Partners report in several formats:

TXT output

XLS output

HTML output

PDF output

ODT output