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

Reporting Server/Domains Translation and Security


An important feature of Openbravo data handling is that a user can only see data related to the organizations for which he/she is authorized. This is called organizational filtering.

The same organizational filtering is also supported in our reports server. This document describes how to add and enable the correct logic.

The organizational filtering is included in the Jasper domain definition. Another functional topic solved in this part of the solution is translation with a label property file.

Single sign on and organizational filtering

The Openbravo backoffice automatically creates a user in the reports server when a user navigates from the Openbravo backoffice to the reports server or when a report is shown directly in the Openbravo backoffice. When a user accesses the reports server navigating from the Openbravo backoffice the system will automatically create and/or update the user in the reports server. An important user attribute which is set in the reports server user profile is the list of readable organizations as it is set in Openbravo for that user at that point in time. This user attribute is updated at every automatic login from Openbravo to the reports server.

User readable organizations reports server.png

The important thing is that you can make use of this user attribute in input control and domain security files.

Domain Security File

The readable organization user attribute can be used in the definition of a domain security file for your domain. Most of the time a domain definition will contain a join with the obrtmd_org (organization) table. The following domain security file can be added to your domain to support organizational filtering.

<securityDefinition xmlns="" version="1.0" itemGroupDefaultAccess="granted">
        <!-- Row level security -->
        <!-- What access do roles/users have to the rows in the resource? -->
        <resourceAccessGrantList id="Dataset_List" label="ListLabel" resourceId="Dataset">
                <!-- Row level for Organizations -->
                <resourceAccessGrant id="Dataset_row_access_grant_20">
                    <principalExpression>attributesService.getAttribute('readableOrgs', null, false) != null 

Note: as long as your domain has a obrtmd_org table the above security file will work. Jasper will automatically create the necessary joins within the adhoc-view.

Translation of Domains

The tables and columns labels of a domain can be localized so that a user logging in with a specific locale will see the column and table names in his/her language. Translation is done through a property file (per language) which is uploaded in the repository and linked to a domain. See the jasper documentation here for more information.

A label property file must use the ISO-8859 encoding and has this format:


Normally only the LABEL properties are translated. You can generate a property file from the domain. When adding new labels to the property file check the order, they should be specified in the same order as what gets generated by Jasper. If not then it is possible that your label will not be recognized.

Domains translation label file domain.png

Location of labels and domain security file

The translation property file and the domain security file should be placed in the Resources folder of your module folder.

Module security file location.png

Retrieved from ""

This page has been accessed 3,621 times. This page was last modified on 16 December 2019, at 11:16. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.