Getting Started with Developing for Pentaho
Setup Pentaho
Before setting up your environment for developing reports, begin by setting up your development environment for Pentaho here. The environment described in that document will be assumed here.
Setup Your Report Development Environment
Developing reports in Pentaho can be done in several different ways. The most useful development environment discovered so far consists of the following components: The Hsqldb DatabaseManager, the Pentaho Report Designer, the Pentaho Report Design Studio, and the Pentaho Metadata Editor. Optionally, the Pentaho Report Design Wizard may also be used for creating simple reports.
TIP: Pentaho reports use a model-view-controller approach. It is advised to use the Pentaho Report Designer for modifying the view of your reports (*.xml files), and the Pentaho Report Design Studio for modifying the model and controller of your reports (*.xaction files). The recommended workflow for creating a new report is as follows:
- Use the Pentaho Report Designer to start the report, and publish both the .xml and .xaction files for the report to your solutions respository.
- From then on, use the Pentaho Report Designer only to modify the view of your report, and only publish the .xml file to your solutions repository.
- Use the Pentaho Report Design Studio to fine tune the .xaction file of your report.
Pentaho Report Designer
- Download:
- Go to http://community.pentaho.com/sourceforge/
- Click on the link under "Report Designer"
- Choose one of the prd-open... versions (prd-open-1.7.0.RC2 has been used thus far)
- Run: The startdesigner.bat, startdesigner._osx.sh, or startdesigner._linux.sh based on your Operating System
The Pentaho Report Designer is the place to start when first creating a report. For more information on the Pentaho Report Designer and a quick start guide, see http://wiki.pentaho.com/display/Reporting/Report+Designer.
Pentaho Design Studio
The Pentaho Design Studio is a set of plugins for the Eclipse IDE, which allows for fine-tuning of reports and adding features like email.
If you already have Eclipse installed, download (org.pentaho.designstudio.editors.{actionsequence,core,reportwizard}.zip) here. If you don't have Eclipse, use the instructions below.
- Download:
- Go to http://community.pentaho.com/sourceforge/
- Click on the link under "Design Studio"
- Choose one of the pds-open... versions based on your Operating System
- Run: The PentahoDesignStudio executable.
To get started with the editor, you will want to do the following:
- Go to File->New Project
- Select General->Project
- Name the Project Pentaho Solutions
- Uncheck the Use default location checkbox, and input the path to the /pentaho-solutions directory that we checked out from subversion in the Setup Pentaho step above.
- Click Finish
You can now use the studio to edit the .xaction files of the reports in the solution repository. To see more information on getting started with the design studio, see http://wiki.pentaho.com/display/studio/Getting+Started+with+Design+Studio
Pentaho Metadata Editor
- Download:
- Go to http://community.pentaho.com/sourceforge/
- Click on the link under "Pentaho Metadata"
- Select one of the pme-open-1.7.0... versions based on your Operating System.
- Run: MetaEditor.bat, or metaeditor.sh, depending on your Operating System
The Pentaho Metadata editor allows for ad-hoc reporting. Using the metadata model that you create with this editor, other non-developers can use the Pentaho web interface to create reports from your metadata model on-the-fly without having any knowledge of the underlying database or of development in Pentaho.
To see a great demo of how to get started with the metadata editor and use it to create ad-hoc reports, go to http://www.pentaho.com/products/reporting/, and click on the 'Ad Hoc Reporting Demo' link.
DatabaseManager
This tool comes with the Hsqldb package and is very useful for exploring and running test queries on the hypersonic database shared by Gather and Pentaho. To start this program, run the DatabaseManager.sh (or DatabaseManager.bat for Windows) script in the /pentaho-data directory. Then use the following settings to connect:
- Type: HSQL Database Engine In-Memory
- Driver: org.hsqldb.jdbcDriver
- URL: jdbc:hsqldb:hsql://localhost/gather
- User: sa
- Password: <empty by default unless you have changed it>
You can save the settings for later use by entering a "Setting Name" at the top. Once you click OK, you will be able to explore and run queries on the Gather database to test out the queries you will use in reporting.
Pentaho Report Design Wizard
- Download:
- Go to http://community.pentaho.com/sourceforge/
- Click on the link under "Report Design Wizard"
- Select the "pentaho-report-design-wizard-1.7.0.RC2.zip" release.
- Run: reportwizard.bat, reportwizard_osx.sh, or reportwizard_linux.sh, depending on your Operating System
The easiest way to get started writing reports for Pentaho is to use the Report Design Wizard, although in comparison to the combination of the Pentaho Design Studio and Pentaho Report Designer, it provides less flexibility. Follow through the step-by-step guide to learn how to use the wizard. The result will be a set of files defining the report and an xaction for integrating the report into Pentaho. This collection must be published into a Pentaho solution. You can try publishing directly to the server, or by following these manual steps:
- In the final step of the “Pentaho Report Design Wizard”, click the “Publish” button
- Choose “location”
- Browse to the “pentaho-demo/pentaho-solutions/samples” directory. Create a new directory for your report.
- Uncheck “Create JBoss Datasource”
- Click the “OK” button
To make the new report visible to the Pentaho Solutions browser, the directory must contain an index.xml file and an index.properties file. Just copy these (and possibly an icon file like file.png) from an existing sample report. Edit the index files to reflect your preferences. Then, follow these steps in the Pentaho web application:
- Click the “Admin” menu
- Click the “Update Solution Repository” action
- click OK in the confirmation dialog
- click Close in the “Publisher Administration” dialog which confirms that the update is complete
- Click the “Go -> Solutions” menu item
- Look for your report in the list (the name will be the name defined in your index.properties file)
