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

How to create a Report

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.

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

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

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

This page has been accessed 14,824 times. This page was last modified on 12 August 2011, at 10:54. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.