Actuate is sponsoring a customer day in San Francisco on November 8 and
in New York on November 14. This one day event is free to all and will
focus on Big Data and Data Visualization. Shaku Atre will be doing a
keynote on Big Data entitled “Big Data in Motion and Humongous Data at Rest”. Stephen Few will be doing a keynote on Data
Visualization entitled “Telling Compelling Stories with Numbers” in San
Francisco and Geoff McGhee will be presenting “Telling Stories with Data” in
New York. There will also be breakout sessions focused on Dashboards and
Scorecards, Tips and Tricks, and Big Data Visualizations. I will be
doing a talk in the Tip and Tricks breakout entitled “BIRT Essentials: Tips and
Tricks Every Developer Should Know”. In this talk I will cover some of
the most effective but least understood features of BIRT including how to
improve performance, scripting, accessing Big Data sources, debugging reports,
and making your reports more dynamic.
Tuesday, October 16, 2012
Big Data and BIRT in San Francisco and New York
Posted by
Jason Weathersby
at
7:51 AM
15
comments
Friday, September 28, 2012
BIRT 4.2.1 Released
Posted by
Jason Weathersby
at
11:31 AM
17
comments
Monday, September 10, 2012
BIRT, Cassandra and Hector
While
BIRT offers many ways to connect to Cassandra, including using the Cassandra
JDBC driver, this post focuses on using a Scripted data source to call the
Hector Client Java client. A BIRT scripted
data source allows external Java classed to be called to retrieve data for a
BIRT report and can be written in Java or JavaScript. The examples below will use JavaScript. For this post we used the DataStax
community edition which is available here, and created a keyspace with the name users and a column
family named User. The User column
family contains three string columns for first name, last name and age. The script used to load the sample data is
available in the example download.
Set Designer Classpath
-
hector-core-version
.jar - hector-object-mapper-version
.jar - slf4j-api-version
.jar - libthrift-
version.jar - apache-cassandra-thrift-version
.jar - guava-rversion
.jar - commons-lang-version
.jar
Select the enable project specific settings checkbox and add the jars in the lib folder you created earlier.
Creating a Scripted Data Source using Hector
Deploying a Report that Uses the Hector API
Posted by
Jason Weathersby
at
8:24 AM
7
comments
Tuesday, July 31, 2012
Using a Global JS Function across BIRT Reports
BIRT provides a scripting model that allows
report customizations by implementing event handlers. These events can be written in Java or
JavaScript. This model is described on
the Eclipse Birt Site.
//external js function
function reverseMyString( MyString )
{
var rString = "";
for (i = 0; i < MyString.length; i++)
{
rString = MyString.substring(i, i+1) + rString;
}
return rString;
}
Posted by
Jason Weathersby
at
6:03 PM
18
comments
Wednesday, June 27, 2012
BIRT 4.2 Released
Posted by
Jason Weathersby
at
11:18 AM
1 comments
Wednesday, June 20, 2012
BIRT Area Chart Modifications
var dpharray = seriesRenderer.getSeriesRenderingHints().getDataPoints();
var xval = dpharray[0].getLocation().getX();
var wid = dpharray[0].getSize();
dpharray[0].getLocation().setX(xval-(wid/2));
var xval = dpharray[dpharray.length-1].getLocation().getX();
dpharray[dpharray.length-1].getLocation().setX(xval+(wid/2));
Posted by
Jason Weathersby
at
9:35 AM
4
comments
Friday, May 11, 2012
Add Values to a BIRT Chart
When building reports that contain Charts, the BIRT data engine is responsible for creating the chart series data points. These data points are generally tied to BIRT data sets or cubes. While these mechanisms handle a lot of the grouping an aggregation of the data to be charted it may be desirable to add some manual data points to the chart. Fortunately this can be done with a fairly simple chart script event handler. If you have not done any chart scripting before, you may want to read over this post on scripting.
Chart event handlers are fired on the server and can be written in Java or JavaScript. The event order is listed in the post described earlier. The before and after DatasetFilled events are fired first. These events are fired for every runtime series that will be plotted. For example if you have one bar series, these events will be fired once for the category series values and once for the bar series values. If you use optional grouping, these events will be fired for every optional group the data engine encounters. The afterDataSetFilled event handler is passed a reference to the current series and the data set that will be used by the chart engine. This is an ideal location to change values, check for nulls or add values to the chart.
Lets assume we have the following Chart:
This chart contains one bar series with four data points. In this example the afterDataSetFilled event will be fired twice, once for the category values and once for the bar series values. We can then use the following script to add a value to the beginning and the end of the series.
function afterDataSetFilled(series, dataSet, icsc)
{
importPackage( Packages.java.util );
importPackage(Packages.java.lang);
importPackage( Packages.org.eclipse.birt.chart.model.type.impl );
importPackage( Packages.org.eclipse.birt.chart.model.data.impl);
var list = dataSet.getValues();
var narray1 = new ArrayList( );
//Check Series Type
//SeriesImpl used for category series
//AreaSeriesImpl
//BarSeriesImpl
//BubbleSeriesImpl
//DialSeriesImpl
//DifferenceSeriesImpl
//GanntSeriesImpl
//LineSeriesImpl
//PieSeriesImpl
//ScatterSeriesImpl
//StockSeriesImpl
if( series.getClass() == BarSeriesImpl ){
narray1.add(new Double(40.6));
}else{
narray1.add("AddBefore");
}
var llen =list.length;
for ( i=0; i < llen; i++)
{
narray1.add(list[i]);
}
//Chart Data Set Types
//BubbleDataSetImpl
//DateTimeDataSetImpl
//DifferenceDataSetImpl
//GanttDataSetImpl
//NumberDataSetImpl
//StockDataSetImpl
//TextDataSetImpl
if( series.getClass() == BarSeriesImpl ){
narray1.add(new Double(25.6));
series.setDataSet(NumberDataSetImpl.create( narray1 ));
}else{
narray1.add("AddAfter");
series.setDataSet(TextDataSetImpl.create( narray1 ));
}
}
The first thing this script does is to get the current values for the given series and creates a new ArrayList. Next it checks to see which series triggered this event. It does this by checking the series class. You could also check the series identifier. Once the series type is determined we add an initial value to the ArrayList, followed by adding all existing values to the ArrayList. Finally a last value is added to the ArrayList and a new chart data set is created. The type of chart data set that is created will depend on how you configured the chart and what type of chart you are using. The comments show additional options. In this example we are using a Text data set for the categories and a number data set for the bar series values. The output of the chart should now look like:Chart After Script
This example is available for download at Birt-Exchange. For an example on adding a whole new series to a chart, see this post.
Posted by
Jason Weathersby
at
1:47 PM
13
comments





















