Speeding up iReport integration
Quick summary
The Jasper Reports integration adds a dedicated screen for selecting a model and uploading reports and subreports more easily. The article also describes proposed improvements for connecting iReport directly to OpenObject; at that point, only the OpenObject fields provider had been implemented.
Contents
Jasper Reports integration improvements
Recently, the jasper_reports integration module received another improvement.
We added a specific menu entry at:
text
Administration → Customization → Jasper Reports → Jasper Reports
It looks like this:
The screen is much more user-friendly than the low-level XML Report interface. It allows users to select the model and upload reports directly.
Compared with previous versions, it has also been improved in the following ways:
- It is no longer necessary to press the Update from attachments button.
- Users can upload multiple subreports.
With these recent changes, we believe the next step for improving the integration is to add a new Fields Provider class to iReport and allow it to connect directly to OpenObject.
This would provide several advantages:
- Add an entry called OpenObject in iReport, making it easier for users to remember instead of asking them to select XPath.
- Compile and preview reports with translations by using our
tr()family of functions. - Preview reports using real data.
- Display field names in the user's language, as happens currently, but without concatenating the internal field name.
- Browse structures deeper than five levels, which is currently almost impossible.
- Avoid having to create an XML file with the OpenObject client before designing or redesigning a report.
Of all these features, only the first one has currently been implemented:
However, this feature is not particularly interesting by itself, as it simply displays the XML fields provider. Its main benefit is avoiding the slightly confusing requirement for users to select XPath.
The remaining features are not especially difficult to implement, but they require several hours of work that we cannot currently afford to finance alone.
However, if you believe you can contribute code or funding, we can make them available sooner. Once implemented, these improvements will save all of us a considerable amount of work.
For more information, contact us at:
info at nan dash tic dot comalbert at nan dash tic dot com
Frequently asked questions
What does the new Jasper Reports screen make easier?
It lets users select the model and upload reports directly from a dedicated menu entry, with a simpler interface than XML Report.
What improvements does the new Jasper Reports integration include?
There is no longer a need to run Update from Attachments, and multiple subreports can now be uploaded. An OpenObject fields provider was also added to iReport, although the other proposed improvements were not yet implemented.
Which features were proposed for iReport’s fields provider?
The proposals included an easy-to-select OpenObject source, previews with translations and real data, field names in the user’s language, navigation through structures deeper than five levels, and removing the preliminary need to create XML with the OpenObject client.
Which fields-provider feature had been implemented?
Only the OpenObject entry in iReport had been implemented. It displays the XML fields provider and avoids having to select XPath; the other features required more work and funding.
Related articles
Developer
Translations and user information in Jasper Reports
The `jasper_reports` module adds a virtual User relation so reports can access information about the person running them, even when the document is not related to a company. It also supports designing and previewing translations in iReport with `i18ngroovy`, the required libraries and the `tr()` functions.
Developer
Generating Jasper Reports from several models
The article explains how to build Jasper reports that start from one model while displaying related data from another. The solution is to use a subreport and configure the `OPENERP_PATH_PREFIX` property with the path from the main model to the subreport model; in the example, the prefix is `order_line/product_id`.
ERP and Business
Accounting reports with Jasper
The `account_jasper_report` module provides Journal, Trial Balance, General Ledger and VAT Register reports for OpenERP v6. According to the article, it dramatically reduces accounting-report generation time and requires the latest version of `jasper_reports`.

