This post follows on on from our last article, ‘Adding your Custom Query into Pentaho Report Designer’ https://www.targetintegration.com/general/adding-your-custom-query-into-pentaho-report-designer –
it is recommended that you read through the previous articles for ease of reference.
We have now created a Custom Report query in Pentaho Report Designer, and produced a file in the .prpt (Pentaho Report) format.
We will now re-incorporate the report back into the OpenERP interface, so that users can easily access the report alongside standard OpenERP reporting;
Firstly, install the module ‘Pentaho Reports for OpenERP’ in your database:
Now, in the same ‘Settings’ page, select Technical > Actions > Pentaho Reports, and click ‘Create’;
Fill out the required (blue) sections:
Name: What the report will be called
Service name: name of the report, but ensure it is typed all in lowercase (no caps)
Model: Selects the Object in which the query will run on – in our previous example, we used ‘res.partner’ to build our query – type this into the Model field, and it will give you the option ‘Partner’. Select this.
Output Format: As before in the PRD interface, we have the option to select the output type (PDF, Excel, CSV and so on)
In ‘File’ select the .prpt file that we prepared previously, and click ‘Save’.
Now, to use our report, we go to the Objects specific page – in our example we used Partner as a reference, so we go to Sales > Customers, and switch from Kanban view to List View;
Select the checkboxes beside the Customers you wish to view, and click the ‘Print’ dropdown – you will see the Custom Query name in the list – ‘Layout Test’ was our Query name;
This downloads the report in the chosen filetype, which can then be used however your requirements need;
And that’s it! You can now create and incorporate Custom Pentaho Queries in your OpenERP v7 database for reporting!
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.