Saturday, October 15, 2005

Integrating BIRT with Your Application

I recently started to explore BIRT - Eclipse Business Intelligence and Reporting Tool. As illustrated in the following examples available on BIRT's web site, it provides a wide range of reporting and charting capabilities.

One of the features, that I find quite promising is the ability to easily embed the BIRT engine in custom applications. This can easily be illustrated through a basic unit test. The code below illustrates the key elements required to get started:
     * @see junit.framework.TestCase#setUp()
    protected void setUp() throws Exception
        // The directory where the key plugins are located.
        System.setProperty("BIRT_HOME", "C:/.../src/main/resources");


     * @throws Exception Throws exception.
    public void testRunReport() throws Exception
        String[] args = {
            // The format
            // The output directory
            // The locale
            // The encoding
            // The file to generate the report from.
The BIRT_HOME directory should contains the following runtime plugins required for the embedded engine:
BIRT Plugins

No comments: