The Axelor Open Platform integrates powerful BIRT reports for reporting.


Following configuration settings should be provided via

# The external report design directory
# ~~~~~
# this directory is searched for the rptdesign files
# (fallbacks to designs provided by modules) = {user.home}/axelor/reports
  • - the external directory of design files and related resources

Directory Structure

The reports directory structure should be as follows:

  • reports - contains design files (.rptdesign)

  • reports/lib - contains library files (.rptlibrary)

  • reports/img - contains images

  • reports/css - contains style sheets

The reports can also be provided from modules itself from the src/main/resources/reports directory which follows same structure.

If configuration is given, the resource locator first searches design files and related resources from that directory and fallbacks to the module provided resources.

Report Data Source

The reports should only use JDBC Data Source to create data sets for the report.

The Axelor Open Platform applications utilizes the internal hibernate connection to configure the report data sources.

Action Report

Reports can be executed using a special xml action action-report.

The <action-report> is used to define the action reports.

Table 1. Attributes
Name Description


name of the action


the design file name (.rptdesign file)


name of the output file (can use ${name}, ${date}, ${time} to provide dynamic name)


output format (pdf, doc, xsl, ps, html)


boolean, whether to attach the generated report to current object

The action report can have the following elements:

  • <param> - the report parameter

    • name - name of the parameter

    • expr - expression to provide parameter value

    • if - condition to check before preparing the value


<action-report name="action-report-invoice"
    <param name="some" expr="eval: expression" if="confirmed"/>
    <param name="thing" expr="constant" />

The action-report must be the last action in the group of actions. For example:

<button ... onClick="action-report-invoice" /> (1)
<button ... onClick="save,action-some,action-report-invoice" /> (2)
<button ... onClick="save,action-some,action-report-invoice,action-another" /> (3)
1 valid, only one action
2 valid, action-report is last action
3 invalid, action-report is not last action


The Axelor Open Platform provides easy to use API to handle report generation.

  • - provides methods to generate reports

  • - provides a preconfigured singleton instance of IReportEngine

You can generate reports from your code like this:

public class PrintService {

    @Inject private ReportGenerator generator;

    public void print(String design, Map<String, Object> params) throws IOException {

        OutputStream output = new FileOutputStream(...);
        try {
            generator.generate(output, design, params, Locale.getDefault());
        } finally {

You can also work with IReportEngine instance directly (not recommended though) like this:

public class PrintService {

    @Inject private IReportEngine engine;

    public void print(String design, Map<String, Object> params) throws IOException {

        IResourceLocator locator = engine.getConfig().getResourceLocator();
        URL found = locator.findResource(null, design, IResourceLocator.OTHERS);

        if (found == null) {

        // TODO: open the design
        // TODO: create render tasks
        // TODO: provide task options
        // TODO: run the task