You can use Pentaho Report Designer to Create Reports for OpenERP v7 – Here’s a brief tutorial on how to get started.
- Simply open your Penatho Report Designer, and click Data > Add Datasource > Advanced > OpenERP Data Access
- Enter your hostname and port number (8069 will be selected by default, change this if your OpenERP server runs on a different port)
- You will then be prompted to select the correct database name in the ‘Database’ drop down list. Add in your login credentials, and for ‘Model Name’, select the object on which you want to report on (for example, ‘res.partner’ to report on Partners)
- Finally, click ‘Test’ to ensure you can connect to the database – you should get a ‘Connection was successful’ message.
- Then, click ‘OK’ to start creating your report.
Now you are back in Pentaho’s Report Design interface. On the top right panel in the designer, switch from ‘Structure’ to ‘Data’, then double click on ‘Data Sets’.
You will then see ‘OpenERP Data Access’, double-click on that to get to ‘Query1’ – double click on this.
This will then display 3 options –
1) Data Source (which we configured already, but, should you wish to switch databases you can)
2) Search Fields – clicking on this will show you all the fields that ‘flow’ from the object, such as ID, Dates, etc – you can drag and drop these into the ‘Selected Fields’ panel, and start building your query. You can select ‘Preview’ at any time to view your progress;
Here, we can see the ‘Email’ field being added to the Query – note how it also shows up in the ‘Structure’ panel on the right:
(To ensure you are selecting the correct fields, it is highly recommended that you switch on Developer Mode in your OpenERP database – http://help.openerp.com/question/83/how-can-i-activate-the-developer-mode/ – this will allow you to hover over the fields in OpenERP, and give you the correct field names that you wish to incorporate into the query)
3) Filters – this allows you to refine the query on the field(s) selected in the last step – click the object you want to filter, and click the circular ‘+’ button – this will then give you the option to apply standard filtering methods (NOT, AND,), select the field within the object itself (ID, Date, etc), Comparator (=, >, <) and value – this is especially good for filtering ‘null’ values from your queries.
Once you are happy with the results in ‘Preview’, save your work and move on to the next stage – adding the field(s) to your report page: https://www.targetintegration.com/general/adding-your-custom-query-into-pentaho-report-designer
Thank you for reading this blog. If you have questions on any of the above, please contact us by filling the form at (http://www.targetintegration.