Projects:Upgrade Jasper Libraries/Functional&Technical Specifications
Contents |
Introduction
The objective of this project is the upgrade of the JasperReports library which is used within Openbravo for report generation.
Functional requirements
Jaspersoft Studio
As of version 5.5.0, Jaspersoft Studio is the official design client for JasperReports. iReport will remain as a supported product in maintenance-only mode until December 31, 2015.
With this project, the JasperReports library is being upgraded to version 6.0.0. For this reason, the Jaspersoft Studio is going to be the supported and recommended design client to work with Openbravo reports. The recommended version is 6.0.0. It can be downloaded from here.
New Features
Apart from the ability to use the new design client, several new features are included inside the new version, that will be available and ready to use in Openbravo.
- Advanced Excel features: Dynamic Sheet Names, Format Pattern Property, Column Width Adjustment Properties etc. More information can be found here.
- Custom Functions in Report Expressions: ability to include built-in functions which can be invoked directly in reports. They can be used in the expression of any text field. For additional information see here.
- Export API: new API for setting exporter's input, output and configuration, which replaces the now deprecated parameter based exporter configuration. The ReportingUtils class already includes some methods for this new API.
- Exporting to JSON Format Using Report Metadata: it is possible to export the report in JSON format, allowing the generated data in the report to be properly stored, transmitted or manipulated by specific engines.
- Map Report: the map component in JasperReports allows to generate the most common Google maps inside a Report.
- New PDF Export Configurations: new PDF exporter configuration properties (net.sf.jasperreports.export.pdf.permissions.allowed and net.sf.jasperreports.export.pdf.permissions.denied) to control PDF file permissions from within the report template or globally, from JasperReports configuration context.
- New XLS Exporter: new Apache POI based XLS report data source.
- Table of contents: Ability to create a table of contents with hyperlinks at the beginning of the document.
- Report Parts: parts are external report templates, similar to subreports, and allow creation of documents with variable page size and/or orientation; parts can be displayed on separate tabs by report viewers and simplify creation of Table of Contents structures.
- Report Book: new type of report in which sections are made of parts instead of bands. For more detail, see the following link.
Technical requirements
The technical requirement of this project is to get up-to-date report designs, in accordance with the current JasperReports schema.
For the already existing reports, it will be necessary to update its definition by replacing or updating the obsolete report elements being currently used. I should be check if the new java classes provided by the JasperReports API have changed (See the API Change number PR15Q3.3).
JasperReports distribution provides some utility tasks that will be used in order to update all the standard .jrxml and .jasper report definition automatically. An update sample task can be found here.
On the other hand, the new JasperReport library includes a dependency with the iText library, version 5.5.0. The version used in Openbravo until now is 2.1.7 so this library should be upgraded too. Due to this change, the following should be noted:
- The java package com.lowagie.text has been replaced with com.itextpdf.text
- This new iText version is licensed under AGPL V3 license with LGPL Exception. That means that it is only allowed to call this library through interfaces provided in the Jaspersoft LGPL Library and not in any way use this library except through the Jaspersoft LGPL Library.
The code will be reviewed and modified to ensure that the license terms are fullfilled. This results in a public API change reported here (number PR15Q3.4).
Along with this library, two new libraries are required to be included in the distribution
- Jackson: the Jackson library is a JSON parser for Java, used internally by JasperReports
- Apache POI: Apache POI is used by JasperReports in the XLS exporter and data source
Finally, the published modules should be reviewed in order to check how they are affected by this new library changes. In particular, the following modules are affected:
- Analytics (org.openbravo.client.analytics)
- Integration with Google Apps (org.openbravo.integration.google)
- Print and Send (com.openbravo.gps.printandsend)
A new version of each one of them should be published, adapting the code if required, removing the duplicated libraries and a new dependecy with core should be established for each one of them.
Performance Requirements
The only performance requirement of this project is just to make the library upgrade transparent in terms of report rendering time, i.e., after the library upgrade the time spent to render the reports should be, at least, equal to the time spent before the upgrade.