Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Excerpt

May 31, 2006
Submitted by Mike D'Amour, Pentaho Team Developer

This week's technical tip is an introduction to the Pentaho Report Designer, the newest open source addition to the Pentaho project. In this article, I will use the Report Designer to build a JFreeReport against the Pentaho sample data, the output being very similar to the Quadrant Report in the demo samples.

...

  1. Your first step is to make sure that the Pentaho sample data is up and running. If you haven't done it yet, you should unzip the pentaho demo data package to a working directory.
  2. Start your sample databases using the start_hypersonic.bat (or .sh, depending on platform) file in the root directory of the demo data that you just unzipped. You should see a new command window with several Hypersonic messages displayed. This is a good indication that your databases started successfully.
  3. Next, unzip the Pentaho Report Designer to a directory of your choice. Start the designer using the startdesigner.bat (or .sh, depending on platform) file in the root directory.
  4. The easiest way to get your report started is to walk through the designer's Report Wizard. From the File menu, select the Report Wizard... option.
  5. The first step in the wizard is to select the type of dataset that you want to use in your report. For our example, we want to use a JDBC Dataset, so select the "JDBC dataset" from the combo box.  Choose the Next button.
  6. The next step in the wizard asks for your Connection Settings. These are the parameters that you need to define in order to connect to your database. Add the following connection information:
    • Jar Location of the hsqldb.jar - This jar can be found under the Pentaho demo data directory, in the lib directory. So, if you installed the demo data to d:\pentaho-data, then the hsqldb.jar is located at d:\pentaho-data\lib\hsqldb.jar.
    • DriverName: org.hsqldb.jdbcDriver
    • Connect String jdbc:hsqldb:hsql://localhost/sampledata
    • User Name: PENTAHO_USER
    • Password: password
    • Click the Test Connection button to see if your connection settings work. If you get a  "Connection Successful" dialog, then you are golden! Click the Next button to move on.
  7. This step in the wizard is where you define your query. Enter select * from quadrant_actuals in the text box on the right. Click the Preview... button to preview your data, and be certain that your query is error-free. As soon as everything looks right, click Next.
  8. The next step in the wizard allows you to select which fields in the query resultset will be visible in the  report. We don't need to change anything here, so click Next to move on.
  9. You will define levels of grouping the data in the next step. We want to group by Region and Department in our report. So, select Region from the left hand list, and click the Add button to move it over as a group on the right. Do the same now for Department.
  10. The next step allows us to define functions for our grouped data. We want to sum ACTUAL, BUDGET and VARIANCE numbers in our report. So, in the Function column, select ItemSumFunction as the function for Actual, Budget and Variance fields.
  11. The next step affects the appearance of our report. Change the Template from Block to Indented. Click the Finish button.
  12. We now have the beginnings of a nice report. To preview your report with data in it, choose the Preview button on the bottom of the report design page.

...