Reporting Server/Development Overview and Environment
The architecture of the reporting solution is shown in the slide below. Openbravo Reports Server is deployed on its own server with its own dedicated data warehouse database. The data warehouse is updated periodically (daily or more frequently) from the Openbravo transactional database.
The update is done through a data-loader application which is generated at deployment time from the load script definitions.
The reporting database is used within the reporting solution to create domains, ad-hoc views and reports.
Therefore when developing for the reports server the following artifacts can be identified (each corresponding to the different components in the architecture):
- Tables and materialized views in the reporting database/data-warehouse
- Load scripts to load data from Openbravo into the reporting database (run within the data loader app)
- Update scripts to update data after the load action (run within the data loader app)
- Domains within the reports server to support ad-hoc views and reports
- Ad-Hoc Views, Reports and Dashboards within the Reports Server
- Jasper Studio Reports which can be run as jrxml from the reporting server
- Translation using resource bundles and Organizational Filtering within Domains using domain security files
The reporting database definition and load scripts are maintained with an Openbravo development environment. The domains and reports are created within the reports server and placed in repository folders in the reports server corresponding to modules. The artifacts maintained within the reports server are downloaded into the module folder so that these can also be included within a repository and deployed (uploaded).
The development and packaging of the artifacts is described in more detail in several other documents. This document focuses on setting up a development environment.
Openbravo Source & Modules
For development you need a recent (20Q1 version) Openbravo source tree/project tree. Enable it for development as you do for other developments also (set Openbravo.properties, include in Eclipse etc.).
Note: you don't need the functional modules from which the data is loaded in the reporting development environment. As long as there is a database with the functional data you are good.
The following two modules provide the integration and development tools:
Install/add these to the modules folder.
Then you will need to place your work in a module also. For this create a relevant module within the modules folder.
Two examples of modules which contain reporting artifacts are:
Do install.source or other actions to get to an operative Openbravo instance. This is the instance you will be using for developing reporting artifacts.
The previous section discussed setting up a development environment. For your reporting development you also need a database with functional data (products, tickets, pos terminals, etc.). So keep this information at hand as you need to set it in the reporting.properties property file.
Development Reports Server
For developing the reporting data warehouse and load/update scripts you do not need a running reports server. However, a next step (after the reporting tables) is to define domains and reports within the reporting server. For this development you need to have access to a running Jasper Reports Server which has access to your reporting database. So when you need to develop domains and reports make sure that you have the url and login credentials (superuser) of this reports server.
Then go to the modules/org.openbravo.reporting.tools module folder and copy reporting.properties.template to reporting.properties
cp reporting.properties.template reporting.properties
Set the reporting properties. There are different sections each is described seperately within the property file, the following need to be set for the configuration:
- Reporting Server Web Connection properties: is needed to be able to import reports and other configuration. Note: you only need to set the url, superuser.user and superuser.password properties. The default values are probably already okay.
- Reporting database connection properties: the reporting database in which the data is loaded, in the configuration step it is used to create the reporting database, later is used for loading the data.
- client id: the client id of the data to load from the source database
- Openbravo database connection properties: the source database connection properties. Note: this is the database containing the business functional data, it is not the same as the Openbravo database used for the build step.
The first next step is to create tables and materialized views and create the load scripts to load the data.