View source | Discuss this page | Page history | Printable version   

How to create a Report with iReport

Contents

Objetive

The goal of this how to is to describe the steps required to create a new report in Openbravo 3. The example explained is a simple report with a list of products.

Bulbgraph.png   Note: iReport was the recommended design client before PR15Q3. Since PR15Q3 Jaspersoft Studio is the recommended report designer. Go here to know how to create a Report using Jaspersoft Studio.

Acknowledgments

Before starting make sure that you have read the prerequisite knowledge article. And you are confident with Openbravo modularity concepts

Setting up iReport

You need to download iReport, a graphical tool that allows you create and modify JasperReports templates (.jrxml files).

Configuring iReport

Some properties of iReport need to be modified in order to work properly. This configuration settings is explained in iReport configuration In short, you need to make sure:

Setting up Classpath

Ireport-classpath.png

Defining a Database Connection

Ireport-database-connection.png

Creating the Template

Ireport-new-file.png
Ireport-new-file-location.png
Ireport-define-query.png
Ireport-define-fields.png
Ireport-report-property-language.png
Ireport-detail-band.png


Ireport-sample-output.png
Bulbgraph.png   Note: It is recommended to use Dejavu fonts in jasper reports because this fonts support most of the characters in almost all languages​​. Besides, Dejavu typography is the family of fonts that Openbravo included in jasperreports-fonts library.

Registering the Report in Application Dictionary

Creating the Report

Bulbgraph.png   Note: Report checkbox must be unchecked
Add-report.png

Creating the Menu record

Add-menu-entry.png

Compiling

After you have registered the report and menu entry in the Application Dictionary, you need to compile to generated the the necessary code.

ant smartbuild

Once the compilation has completed, refresh your Eclipse project, and restart your tomcat server.

Testing the Report

If you have completed all the steps, you should be able to open your Product List report form the quick-lauch, or menu entry.

Final-product-list.png


Further Details

Layout

For information on how JasperReports handles the layout check Making HTML, XLS or CSV friendly reports

Creating a Report Using a Process Definition

Bulbgraph.png   This feature is available from 3.0PR15Q2

From 3.0PR15Q2 it is possible to create a report using a process definition. For more info see here.

Retrieved from "http://wiki.openbravo.com/wiki/How_to_create_a_Report_with_iReport"

This page has been accessed 22,542 times. This page was last modified on 28 May 2015, at 14:32. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.