New and Notable Features within BIRT 4.2

Introduction

In conjunction with the Juno release, the BIRT team is pleased to announce the availability of BIRT 4.2. This document describes some of the new features that are available within the 4.2 release.

To review the projects included in the 4.2 release, see the BIRT 4.2 Project Plan. Some features have also been back-ported to BIRT 3.7.2. These are marked with an asterisk in the feature header in this document.

As with all BIRT releases, the BIRT team appreciates your feedback and suggestions. To get involved in the project take a look at the BIRT community links.

New Donut Chart Type

BIRT currently provides an extensive chart engine that can be used standalone or in conjunction with the BIRT designer. The engine supports fourteen main chart types with many subtypes which can be rendered in many formats, such as SVG, PNG, JPG and BMP. The engine also supports client side interactivity to allow developers to provide features such as drill to details and multi-hyperlink capabilities. In addition the chart engine provides a set of extension points that allow developers to create new chart types, complete with custom GUIs that can be plugged into the Chart Designer. In the Juno release of BIRT, the Pie chart type has been extended to now support an inner radius property that will allow developers to ability to create donut chart types.


Donut Chart Design

The inner radius property can be set as a percentage of the chart or as a specific pixel value. While the value can be set in the designer, it can also be set in script using a beforeGeneration event handler on the chart similar to the following:


		importPackage( Packages.org.eclipse.birt.chart.model.impl );
		importPackage( Packages.org.eclipse.birt.chart.model.type.impl );
	
		if( chart.getClass() == ChartWithoutAxesImpl ){
			seriesDef = chart.getSeriesDefinitions().get(0);
			catRunSeries = seriesDef.getRunTimeSeries();
			valSeriesDef = seriesDef.getSeriesDefinitions().get(0);
			valRunSeries = valSeriesDef.getRunTimeSeries().get(0);
		
			if( valRunSeries.getClass() == PieSeriesImpl ){
				valRunSeries.setInnerRadius( 60 );			
			}
		}


Donut Chart Report

New Excel Data Source

As with all information applications, the visualizations are only as good as the data that is analyzed and retrieved. BIRT is no exception and provides extensive support for retrieving data. BIRT currently supports drivers for JDBC, XML, Web Services, Flat Files, and Hive. In addition BIRT also supplies a Scripted Data source that can be implemented in Java or JavaScript that can be used to access virtually any data source that is structured or contains an API. In this release BIRT has added support for Excel files to be used as a data source. This new ODA has the following features:

  • Supports both XLS and XLSX formats
  • Retrieving the Excel file from an absolute path or a relative path within the resource folder
  • Reading Multiple Sheets within one BIRT Data set
  • Connection Profile support
  • Column name and data type row selectors
  • Date, DateTime and Time support

Excel Data Source


Excel Data Set

The new Excel driver supports multiple worksheets, by specifying the Worksheet property binding setting.


Worksheet Property


Example output

Maven Support

While many artifacts from previous versions of BIRT have made it into a Maven repository, with this release of BIRT, the build process has modified to upload releases to the Sonatype repository. The BIRT runtime artifacts will be uploaded for each release of BIRT and will allow developers to integrate any of the BIRT engines into an existing Java application using Maven. Example POM entries are shown below.

<repository>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
      <updatePolicy>daily</updatePolicy>
      <checksumPolicy>ignore</checksumPolicy>
    </snapshots>
    <id>sonatype-nexus-snapshots</id>
    <name>Sonatype Nexus Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>

<repository>
   <releases>
      <enabled>true</enabled>
   </releases>
   <snapshots>
      <enabled>false</enabled>
      <updatePolicy>daily</updatePolicy>
      <checksumPolicy>ignore</checksumPolicy>
   </snapshots>
   <id>sonatype-nexus-releases</id>
   <name>Sonatype Nexus Snapshots</name>
   <url>https://oss.sonatype.org/content/repositories/releases</url>
</repository>

<dependency>
    <groupId>org.eclipse.birt.runtime.3_7_1</groupId>
     <artifactId>org.eclipse.birt.runtime</artifactId>
     <version>3.7.1</version>
</dependency>

<dependency>
  <groupId>org.eclipse.birt.runtime</groupId>
  <artifactId>org.eclipse.birt.runtime</artifactId>
  <version>4.2.0.v20120605-1006-SNAPSHOT</version>
</dependency>  

For more information see the following bugzilla entries.
bugzilla id 258911
bugzilla id 379081

Relative File Support

Currently BIRT requires full paths or URLs when using some data sources and connection profiles. With this release, BIRT now includes relative path support in these cases. Included are data sources like Flat File and XML as well as connection profiles. The browse button has been modified in these cases to offer relative or absolute paths.


Relative File Support

When using a relative path, it will be relative to your resource folder. So in the case shown above the Employee.csv file is a relative file and should exist in your resource folder. The resource folder can be set in the designer preferences and in the web.xml of the example Viewer.

Eclipse 4.2 as Primary Workbench

With the Juno release of BIRT, Eclipse 4.2 is now the default workbench. BIRT has been fully built, tested and is supported to run on Eclipse 4.2. In addition Eclipse 3.8 is still supported.

*Enhanced Aggregate Filter Support

The BIRT project currently provides an Aggregation Report Item. This Report Item supplies over 25 aggregate functions, like SUM, COUNT, TOPN, that can be used to analyze data. The Aggregation Report Item even provides an extension point to add your own functions. While this Report Item is very powerful it only aggregates the rows available to it. If you apply filters to the container element, the Aggregation Item will only aggregate the filtered rows. This is not always desired. In some cases users filter rows for display purposes only. In these cases, consumers of the data may still wish to have the filtered rows aggregated. To accommodate this feature a check box has been added to the Filter Editor. This checkbox "Recalculate Totals", determines if aggregates will include the filtered out rows. If the box is checked the rows will be filtered out of aggregation elements. If the box is not checked, the filtered out rows will be included.


Recalculate Checkbox

This feature is available on all filter locations, including data sets, tables, crosstabs and charts.


Table and Crosstab Filter examples


Chart Filter Examples

*Derived Cube Measures

BIRT provides a data cube element which appears in the Data Explorer view and allows the developer to build cubes based on existing data sets. These cubes are constructed using dimensions and measures and can be consumed by crosstab and chart report items. In prior releases of BIRT when adding measures to the cube the user was restricted to the data set elements and an aggregation function. With this release, developers can now create derived measures in the cube which use other measures for calculating the new measure.


Derived Cube Measure

The Measure Editor has been enhanced to supply a check box to indicate whether the measure is derived. If the new measure is derived, new options are available in the expression builder to access the existing measures. For example, in the image above an average price per unit is calculated based on the Amount and Quantity measures. Once the measure is created it functions in the same fashion as existing measures including totaling capabilities.


Derived Cube Measure consumed by Crosstab

*Relative Time Period Report Item

When using crosstabs to display time based data, scripting is often required to implement complex time period calculations. With this release, BIRT now offers a new report item that will handle time period based calculations automatically when used within a crosstab. This report item "Relative Time Period" is located in the palette and can be dragged to the measure field of a crosstab. The new report item can also be placed by right clicking on any measure in an existing crosstab.


Insert Relative Time Period Report Item into Crosstab

The Relative Time Period report item supports 13 different periods, including Previous N Year, YTD, Current Quarter, Trailing NPeriods, and Next NPeriods.


Relative Time Period Aggregation Builder

This report item works very similar to an Aggregation Report item, but allows the aggregation to be grouped on given period(s) in relation to the current time dimension value. For example the following image depicts a crosstab that contains two measures (Amount and QTY) and two Relative Time Period Report Items (QTY to Date and Previous Qtr).


Relative Time Period Example

*OSGi Runtime

With the introduction of BIRT 3.7, a new POJO runtime was delivered to help ease deploying of BIRT. While the new runtime is simpler in most cases some users prefer the OSGi based runtime. With this release the OSGi runtime is also available for download. To download the OSGi based runtime select the "full BIRT {Version} Download Page" link from the main BIRT downloads page.


BIRT Download Page

On the full download page select the Report Engine OSGi deployment link to download.


BIRT OSGi runtime link

*Data Set Cache Control

BIRT makes extensive use of caching to improve performance when generating reports. Generally when a data set is bound to more than one report item, the data set will be cached so multiple queries for the same data are not executed. If a query is using a parameter and the value of the parameter changes the query will be re-executed. While this is probably the most desired approach, it is often the case that users want to re-execute the query for each bound report item instance. This generally happens when a developer is using a filter on a nested report item to control what is displayed based on an outer table value or when the user is modifying the query of a report item using a beforeOpen script on the dataset. With this release of BIRT, it is now possible to configure whether the data engine caches a data set. In the advanced settings for all data sets a new option has been added. This options "Needs cache for data-engine" determines if the data set will be cached. By default this value is true, meaning the data engine will cache the dataset. If you set the value to false the data set will be re-executed for each bound item instance.


BIRT Data Set Cache Control Setting

Miscellaneous

In addition to the above changes, BIRT now provides extension points for connection profile encryption and enforcing file extensions on connection profiles. Also improvements have been made to the process for retrieving a JNDI connection, default parameter with dynamic datasets, font path configuration with the BIRT engine, variable template location and support for EFS.