If you are currently designing applications using BIRT to support the US Federal government, then you should look into the latest survey competition hosted by Actuate. We want to know how you're working with BIRT and the creative ways it's being applied. Anyone using BIRT to develop tools and solutions for the government is eligible. Complete this short 10 minute survey describing your use of BIRT within the Federal government and send us a screenshot of the application by May 11, 2012. All qualified entries will receive a BIRT Rocks! sound activated T-shirt and will be eligible for a chance to win an iPad.
For more information, review the Federal BIRT Competition 2012 Rules and Conditions.
Thursday, April 19, 2012
BIRT Federal Survey
Posted by
Jason Weathersby
at
10:47 AM
0
comments
Friday, March 16, 2012
BIRT 3.7.2 New Features
A couple of weeks ago the Team released version 3.7.2 of BIRT. While this release was mainly focused on bug fixes, a few new features that were originally planned for Juno Release (June 2012) made it into the final build. In this post we walk through some of these features.
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.

BIRT Filter Editor
This feature is available on all filter locations, including data sets, tables, crosstabs and charts. The reports attached to this post include examples for table, crosstab and chart filters.

Table and Crosstab Filter examples

Chart Filter Examples
Derived Cube Measure
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 the release of BIRT 3.7.2, developers can now create derived measures in the cube which use other measures for calculating the new 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 the 3.7.2 release the OSGi runtime is also available for download. To download the OSGi based runtime select the “full BIRT 3.7.2 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
The reports used in this post are available at BIRT Exchange.
Posted by
Jason Weathersby
at
2:26 PM
4
comments
Friday, March 02, 2012
BIRT at CeBIT 2012
The BIRT team will be participating with five other Eclipse member companies in the Eclipse theme island at CeBit this year (March 5-10 Hanover, Germany). There will be scheduled demos and an opportunity to speak with the experts. This event will take place in the Open Source Park in Hall 2, Block D58, Both 170. For more information on this event including the schedule check out this link.
The BIRT team will also be giving a free half-day Workshop (BIRT@CeBIT) on March 9. This Workshop will include presentations on BIRT technology, accelerating with ActuateOne, and Report Designer training. To see the agenda and register for this event go here.
Posted by
Jason Weathersby
at
10:36 AM
0
comments
Wednesday, February 08, 2012
Spring Framework and BIRT Integration
Many BIRT users also use the Spring Framework, and while we have blogged about different integration scenarios before, many of the newer features of both projects have not been discussed. In the last couple of weeks the BIRT and Spring teams have worked together to create some examples and an article (Spring Framework & BIRT) that describes the following integration options:
• Integrating the BIRT engines in Spring MVC
• Accessing Spring beans from the BIRT Viewer
• Using Spring Remoting to access Spring Beans from a BIRT report
These examples were built using the latest versions or BIRT( 3.7.1) and the Spring Framework(3.1.0).
Thanks to Josh Long, Spring Developer Advocate and the Spring team for working with us to put this content together.
Posted by
Jason Weathersby
at
4:01 PM
10
comments
Friday, January 27, 2012
BIRT Runtime Addition
As part of the 3.7 release BIRT now uses a BIRT POJO runtime. This change was described in the BIRT 3.7 New and Notable. If you are using a version of BIRT prior to 3.7 be sure to check out the Migration Guide. As part of the 3.7.2 release of BIRT which will be released in a couple of weeks, the team has decided to release a second runtime that uses the OSGi runtime. This new download will function similar to the BIRT runtime prior to BIRT 3.7 and is available on the full downloads page. You can try out the 3.7.2 release candidate version of this download by selecting the release candidate on the recent builds page.
Posted by
Jason Weathersby
at
7:54 AM
2
comments
Wednesday, October 26, 2011
BIRT Chart Palette
We have posted many times about the different facets of scripting (client and server side) for BIRT charts. Some of these posts are shown below. In many cases users want to modify chart colors based on some data value or some external logic. While this is very simple with the standard palette colors, some of the other palette options are not as straight forward. In this post we will discuss the different palette options developers have and how to access and modify them from script.
Previous Chart Scripting Posts
Chart Scripting Overview
Using Script to Modify a BIRT Chart
Dynamically Adding a Series to a BIRT Chart
Calling Client Side JavaScript From a BIRT Chart
More on Chart Interactivity
BIRT Palette Options
The BIRT Chart Palette supports standard and custom colors, gradients, images, positive/negative entries and patterns.

While standard and custom colors are simple some of the other types offer some interesting possibilities. The Gradient palette entry allows a start and end color as well as a rotation angle for the gradient.

The Image Palette entry allows a developer to specify a URL or embed an image directly into the chart model.

The Positive/Negative palette entry uses one palette color for positive values and one for negative values.

The Pattern palette entry allows the developer to define a pattern with foreground and background colors. The pattern can be one of the predefined patterns or one that is customized.

Palette Scripting
Many of the events that are triggered during the creation of the chart are passed a fill object. The actual data type of the fill object will depend on how the palette has been setup. The Fill object will be one of the following types:
org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionImpl – Color/Custom Color Palette Entry
org.eclipse.birt.chart.model.attribute.impl.GradientImpl – Gradient Palette Entry
org.eclipse.birt.chart.model.attribute.impl.ImageImpl – Image URL Entry
org.eclipse.birt.chart.model.attribute.impl.EmbeddedImageImpl – Embedded Image Entry
org.eclipse.birt.chart.model.attribute.impl.MultipleFillImpl – Positive/Negative Entry
eclipse.birt.chart.model.attribute.impl.PatternImageImpl – Pattern Entry
For example assume that you have a Bar chart that uses one bar color and you want to change this color based on the Y-Axis value of the data point. The following beforeDrawDataPoint Script could be used.
function beforeDrawDataPoint(dph, fill, icsc)
{
//Fill implements Fill interface
//ImageImpl
//ColorDefinitionImpl
//GradientImpl
//MultipleFillImpl
//EmbeddedImageImpl
//PatternImageImpl
importPackage( Packages.org.eclipse.birt.chart.model.attribute.impl );
val = dph.getOrthogonalValue();
if( fill.getClass().isAssignableFrom(ColorDefinitionImpl)){
if (val < 40){
fill.set(255, 0, 0);
}
}
}
In this particular example the fill object is a ColorDefinitionImpl object that supports setting the R,G,B value of the color. Notice also that we import the org.eclipse.birt.chart.model.attribute.impl package to get access to the ColorDefinitionImpl class. If the palette entry was a gradient the script could be changed to something like the following:
function beforeDrawDataPoint(dph, fill, icsc)
{
//Fill implements Fill interface
//ImageImpl
//ColorDefinitionImpl
//GradientImpl
//MultipleFillImpl
//EmbeddedImageImpl
//PatternImageImpl
importPackage( Packages.org.eclipse.birt.chart.model.attribute.impl );
val = dph.getOrthogonalValue();
if( fill.getClass().isAssignableFrom(GradientImpl)){
if (val < 40){
fill.getStartColor().set(255,0,0);
}
}
}
In this example we set the start color of the gradient.

If you are using a Bubble chart with a Positive/Negative palette entry, by default one color will be used for positive values and the other for negative colors. You could alter this behavior for certain data points. For example the following script changes the positive and negative colors for some of the data points.
function beforeDrawDataPoint(dph, fill, icsc)
{
//Fill implements Fill interface
//ImageImpl
//ColorDefinitionImpl
//GradientImpl
//MultipleFillImpl
//EmbeddedImageImpl
//PatternImageImpl
importPackage( Packages.org.eclipse.birt.chart.model.attribute.impl );
importPackage( Packages.org.eclipse.birt.chart.extension.datafeed);
//for bubble chart this returns a BubbleEntry
val = dph.getOrthogonalValue();
yval = val.getValue()
if( fill.getClass().isAssignableFrom(MultipleFillImpl)){
if( yval > -500 && yval < 500 ){
fill.getFills().clear();
fill.getFills( ).add( ColorDefinitionImpl.BLUE( ) );
fill.getFills( ).add( ColorDefinitionImpl.WHITE( ) );
}
}
}

Notice that we needed to import the datafeed package as the bubble chart has size and value entries for the y-axis. We also used the ColorDefinitionImpl predefined colors for blue and white. We could have created the color using R,G,B values like ColorDefinitionImpl.create( 255, 255, 225 ).
Palette Model Location
While the above examples illustrate how to manipulate palette entries that are passed to the other events, it is often desirable to alter one or more palette entries. This can be done in the beforeGeneration event. How you access the chart palette will depend on what type of chart it is: Chart with Axes or Chart without Axes. For example suppose you want to replace the chart palette with a set of predefined gradients. To do this with a pie chart the following script could be used.
function beforeGeneration( chart, icsc )
{
importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl);
sd = chart.getSeriesDefinitions( ).get( 0 );
sd.getSeriesPalette( ).getEntries( ).clear( );
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(220,237,248), ColorDefinitionImpl.create(80,166,218), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(255,213,213), ColorDefinitionImpl.create(242,88,106), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(255,247,213), ColorDefinitionImpl.create(232,172,57), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(213,255,213), ColorDefinitionImpl.create(128,255,128), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(213,255,255), ColorDefinitionImpl.create(64,128,128), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(226,226,241), ColorDefinitionImpl.create(128,128,192), 0, false));
}

In this example we clear the existing palette and replace it with a set of gradients. The palette is attached to the charts first series definition.
For a Bar chart the following script would be used.
function beforeGeneration( chart, icsc )
{
importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl);
var xAxis = chart.getAxes().get(0);
var yAxis = xAxis.getAssociatedAxes().get(0);
var sd = xAxis.getSeriesDefinitions().get(0);
sd.getSeriesPalette( ).getEntries( ).clear( );
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(220,237,248), ColorDefinitionImpl.create(80,166,218), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(255,213,213), ColorDefinitionImpl.create(242,88,106), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(255,247,213), ColorDefinitionImpl.create(232,172,57), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(213,255,213), ColorDefinitionImpl.create(128,255,128), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(213,255,255), ColorDefinitionImpl.create(64,128,128), 0, false));
sd.getSeriesPalette().getEntries().add( GradientImpl.create( ColorDefinitionImpl.create(226,226,241), ColorDefinitionImpl.create(128,128,192), 0, false));
}

In this example the palette is attached to the series definition associated with the x-axis.
As a more complex example, and afterDataSetFilled script could be used to calculate the number of data points in a particular bar chart. The beforeGeneration event could then use this value to create a palette that gives entire chart a gradient look by moving a start color to an end color.
cnt = 0;
startColor = null;
endColor = null;
importPackage( Packages.org.eclipse.birt.chart.model.attribute.impl );
function afterDataSetFilled(series, dataSet, icsc)
{
importPackage( Packages.java.io );
importPackage( Packages.org.eclipse.birt.chart.model.type.impl );
if( series.getClass() == BarSeriesImpl ){
if( series.getSeriesIdentifier() == "Series 1" ){
var list = dataSet.getValues();
cnt = list.length;
}
}
startColor = ColorDefinitionImpl.RED();
endColor = ColorDefinitionImpl.ORANGE();
}
function buildPalette( mNumber )
{
var sr = startColor.getRed();
var sg = startColor.getGreen();
var sb = startColor.getBlue();
var er = endColor.getRed();
var eg = endColor.getGreen();
var eb = endColor.getBlue();
var nr = ((er-sr)/cnt)*mNumber + sr;
var ng = ((eg-sg)/cnt)*mNumber + sg;
var nb = ((eb-sb)/cnt)*mNumber + sb;
var nc = ColorDefinitionImpl.create( nr, ng, nb );
return nc;
}
function beforeGeneration( chart, icsc )
{
var xAxis = chart.getAxes().get(0);
var yAxis = xAxis.getAssociatedAxes().get(0);
var xSerieDef = xAxis.getSeriesDefinitions().get(0);
var ySerieDef = yAxis.getSeriesDefinitions().get(0);
xSerieDef.getSeriesPalette().getEntries().clear( );
for ( i = 1; i <= cnt; i++ )
{
xSerieDef.getSeriesPalette().getEntries().add( buildPalette(i) );
}
}

The example shown here are available at BIRT Exchange.
Posted by
Jason Weathersby
at
11:18 AM
7
comments
Tuesday, August 30, 2011
BIRT Contest
Last week at the BIRT road show in Bangalore, Actuate announced a BIRT contest. The challenge is to extend BIRT by building plug-ins that implement key extension points, like emitters, ODA drivers, charts and report items. The contest runs until October 15, 2011 and the details can be found on the Contest Wiki page.
Posted by
Jason Weathersby
at
7:49 AM
5
comments