First Steps With Birt


Birt in an open source reporting solution including a WYSIWYG report authoring tool and server side reporting engine. OpenActuary includes the server side engine in its default configuration. Report authors run a client application to create report templates which can then be uploaded into OpenActuary where other users can view the reports generated from them.

This tutorial takes you through the process of installing Birt, and creating a simple project with access to am OpenActuary data source. The data in this data source could then be used to author reports.


The latest release of Birt is available for download here.

Birt runs within the Eclipse application framework, and those familiar with Eclipse might prefer to install Birt as a plugin into their exiting Eclipse installation. Apart from the initial download and installation steps, this tutorial is equally applicable to both types of environment.

Once you have downloaded Birt, unpack it into a convenient folder on your machine. You can then start the tool by running the Eclipse.exe (or on MacOS) which you'll find in the installation folder.

In common with normal Eclipse practice, projects are organised into a workspace. You will be prompted to select a workspace, or create a new one as soon as the application starts

Accept the default workspace, and just click "OK". Birt will open and display a welcome screen.

Click the arrow icon on the right to open the workbench

If you've used Eclipse before you'll be familiar with the layout of the screen. If not, the left hand pane displays a navigator view of project elements (blank now because we haven't created a project yet). The middle pane will display the report design, the bottom one dill display various properties. The pane on the right displays an outline tree view of whatever you're editing.

Creating a Project

In the application menu, drill down File->New->Other. This will open a dialog box containing a list of options including "Business Intelligence and Reporting Tools". open this and select "Report Project" then click "Next >".

Give the project the name "OpenActuary Test", and click "Finish", the click "Yes" on the dialog box.

You are now in the report designer proper, but we don't get have a report to work with.

Creating a Report

To create a report navigate to File->New->Report. This will open the new report wizard. Select "OpenActuary Test" if it isn't selected already, and change the file name to "TestReport.rptdesign", then click "Finish".

Now you'll be presented with the actual report authoring tool. The WYSIWYG report designer is in the middle of the screen, with a palette of report widgets on the left and a detail property view at the bottom of the window.

Adding a Data Source

The report will need a data source in order to populate it with some real data. To create a data source for the report, select the "Data" tab, which is right next to the "Palette" in the top left area of the window.

From there, right click "Data Source", and select "New Data Source" from the context menu. You can see from the following wizard that Birt can connect to all kinds of data sources, but in this case we want to connect to a "JDBC Data Source". So, select this and enter the name "OpenActuary Data Source", and click "Next >".

The wizard's next screen lets you enter the database connection details.

You can find out what values to enter by visiting the "Sources" tab in OpenActuary. For our purposes, we'll use OpenActuary's demo user "Lily". Lily works for Met and has writ access to Met's staging database. From OpenActuary's interface, we can get the connection details.

And enter them into the wizard.

Once you've entered the connection details, click "Test Connection..." to make sure the settings are correct. You should get a "Connection successful" response. If you don't, the check the details and make sure that you have MySQL running.

Assuming the connection is working, click "Finish".

Adding a Data Set

To include data form a data source in a report, a data set is needed. This defines the query to run on the database to extract the information for the report.

Back in the Data tab, right click on Data Set, and select "New Data Set" form the context menu.

Make sure the "OpenActuary Data Source" is selected under JDBC Data Source, and enter polPolicy as a "Data Set Name", then click "Next >".

Now we can define the query. Fill in the Query text field as shown below, and click Finished.

A dialog box with then open showing you the columns that result from the query. You can make changes here if necessary, but in this case we just want accept them all. So click "OK" without changing anything.

Now that you have the database defined, and the data set defined, all you need to do is design the report to use them.

15 Attachments
Average (0 Votes)
No comments yet. Be the first.