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

How to change an existing Report

Contents

Objective

One of the firsts customizations required when deploying Openbravo is to modify the templates of the most common documents: Orders, Shipments and Invoices. These documents are common to customers and vendors of the client company and must follow its requirements and corporate image. This document explains how to modify these templates in a modular way taking as example the report template for Sales Orders.

Acknowledgments

Before starting make sure you read the prerequisite knowledge and modularity concepts articles.

You should read also the how to create a report article that explains some concepts and common configuration you must follow in order to use iReport.

Bulbgraph.png   Important Note: This article doesn't explain how to work with iReport

Defining the Module

You should define first a new module that contains your report modifications. For more information about creating a module read the documentation on How_To_Create_and_Package_a_Module.

Howto-change-report1.png

Copying the Base Template

After exporting your changes, you'll get a new folder under the modules folder.

Bulbgraph.png   Note: You should follow the Java package structure

You should end up with some structure like this one:

Howto-change-report2.png

Changing the Template

After making a copy of the base template to your module, you're ready to make all the changes you like. For sake of simplicity, we'll just add a simple label to the report header.

Bulbgraph.png   You can customize your template with any change you like, more fields, changing position, etc
Howto-change-report3.png

Defining the Report Template at Document Level

Report templates are defined at document level. You need to change it in order to work.

Howto-change-report4.png
Howto-change-report5.png

Testing the changes

All the definitions required to use your customized Sales Order template has been done. There is only needed to verify that the new document template created renders the document as expected with an existing Sales Order document.

Howto-change-report6.png

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

This page has been accessed 17,668 times. This page was last modified on 17 July 2011, at 05:38. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.