Monday, November 24, 2008

Friday is the last Day for EclipseCon 2009 proposals

I just wanted to put a post up to let everyone know that the deadline for submissions for EclipseCon 2009 has been extended to Friday (11/28/2008 5pm PST). We are still looking for some use case proposals in the Reporting track and would appreciate feedback on the existing submissions. If you are interested, the EclipseCon 2009 page is located here.

Wednesday, November 05, 2008

BIRT Connection Pooling Continued Again

With the release of BIRT 2.3.1 connection pooling options have been extended.
In a prior post, I built an example that showed how to implement connection pooling using the driverBridge extension point. While this method is useful, with BIRT 2.3.1 there is a much easier method for passing BIRT an already created connection object.

You can now supply a connection by adding the connection object to BIRT’s application context object. The key for this object is OdaJDBCDriverPassInConnection. So to pass in the connection while using the Report Engine API, use code similar to:

IReportRunnable design = null;
//Open the report design
design = engine.openReportDesign("Reports/passinconnection.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
HTMLRenderOption options = new HTMLRenderOption();
task.getAppContext().put("OdaJDBCDriverPassInConnection", this.getConnection());;

This assumes you already have the report engine started. The getConnection method in this example simply creates a java.sql.Connection to my database. You will need to create your own function. Also keep in mind that the BIRT JDBC plugin will close the connection when it has finished with it, so if you plan on using the object in multiple tasks, you will need to reopen it. There is a bug to allow the closing of the connection to be optional -Bugzilla Entry. This application context setting should be applied at the task level.

If you wish to set it in the Example Viewer’s application context take a look at this wiki entry.

These are the ways that a connection can now be manipulated in BIRT:
1-Property binding
3-Script data set
4-DataSource.beforeOpen() event.
5–driverBridge extension
6-Application Context Ojbect (described here)

Another setting the JDBC plugin now provides is OdaJDBCDriverClassPath, which allows setting the classpath for locating drivers. This prevents the user from having to put JDBC drivers in the drivers directory of the JDBC plugin. This should be set on the EngineConfig object and not on the task object.

config = new EngineConfig( );
config.getAppContext().put("OdaJDBCDriverClassPath", "c:/birt/mysql/mysql-connector-java-5.0.4-bin.jar");
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );

Monday, November 03, 2008

Getting BIRT Source

Back in September I blogged about BIRT Team Project Sets.  Last week the BIRT team was able to finish up implementing Team Project Sets.  Instructions on how to use a team project set are available here.

The project set to pull from HEAD is available here.

All of the BIRT releases, milestones, and release candidates now have team project sets are also available.  To get the team project set files go to the birt download page for the release you are interested in.  From there select the full BIRT 2.3.1 Download Page link (each named download has its own link).  At the bottom of the full download page, you will find a link to the Project Set File at the bottom of the page.

Sunday, November 02, 2008

Showing BIRT Reports using the Actuate JSAPI

Actuate is preparing to release a new version of several products that are based on the open source BIRT project. One the coolest new features is a new JavaScript API that can be used to execute and display report content with virtually any front end framework.

This API allows report content to be inserted into any DIV element, and contains methods for parameter manipulation, data extraction, and displaying the viewer. The viewer component has complete functionality for table of contents, exporting reports to different formats, and even the ability to modify sorting, filtering, and grouping from within the browser.

Wenbin, Virgil and I wrote an article on how this API can be used. It is available here. If you are interested in trying out this new API, take a look at the Actuate 10 wiki page located on BIRT Exchange.