BIRT 4.3.0 was released a couple weeks ago with the release of Eclipse Kepler. This blog will talk about the new features that are available in this new release. Below is the list of features that will be discussed. Any features that were back-ported to BIRT 4.2.2 are noted with an asterisk (*).Feature List
New Microsoft Office Emitters
- New Microsoft Office Emitters
- New POJO Data Source
- * New Cassandra Scripted Data Source
- New MongoDB Data Source
BIRT currently supports emitting report output in many formats. These include HTML, paginated HTML, DOC, XLS, Postscript, PPT, PDF, ODP, ODS, and ODT formats. BIRT is designed to be extensible and provides extension points for many components within the designer and runtime. The emitter framework provides an extension point to allow developers the ability to emit essentially any desired output. In this release BIRT will offer enhancements to all three of the Microsoft Office emitters.
For PowerPoint and Word, support for Office 2010 has been added with the inclusion of emitters for DOCX and PPTX formats. For Excel, the popular SpudSoft Excel Emitters were added to BIRT which includes emitters for both XLS, named XLS_SPUDSOFT as the standard XLS emitter will remain, and XLSX. The new XLS & XLSX emitters are able to output pictures, which means charts can now be seen in your Excel export. These emitters will also give a more Excel-like output rather than trying to make the Excel output look like the HTML, meaning no merging of cells. Multiple sheets are also an option with the new XLS & XLSX emitters.
All of the above export formats are available within the designer, in the viewer, or by using the Report Engine API.
XLS/XLSXNEW POJO Data Source
With a couple classes like these:
You would create a POJO data source/set by following these steps:
Create a new data source, selecting the POJO type. Then, hit next and add your POJO jar file so BIRT can locate your class files.
Test your connection and then select finish.
Next, we create a new data set using our POJO data source and choose our CustomerDataset.java class.
Then, select the column mapping class used to define the data set columns and hit next.
Select the columns that you want to include in your data set.
Finally, hit finish and preview your results.
*New Cassandra Scripted Data Source
BIRT 4.2.2 and later supports scripted data source connections for use with Cassandra distributions, including:
- Apache Cassandra
- Datastax Cassandra Community
- Datastax Cassandra Enterprise
BIRT connects to and queries a Cassandra data source using the Hector API. You must copy the Hector client library JAR files to the appropriate folders for both BIRT Designer and the BIRT runtime deployment application. You can download the JAR files from here.
For the designer, copy the JARs into the /plugins/org.eclipse.birt.me.prettyprint.hector_version/lib/ directory. Depending on the runtime type you're using, you'll place the jars in different locations. For OSGi BIRT runtime deployment, copy the JAR files to the /plugins/org.eclipse.birt.me.prettyprint.hector_version/lib/ folder and restart the runtime deployment application. If the "Servlet ViewerServlet is not available" error message appears, copy the org.apache.commons.logging_version.jar (available in WEB-INF/platform/plugins/) to the birt/WEB-INF/lib/ folder. This is a known issue with tomcat-6. For non-OSGi BIRT runtime deployment, copy the JAR files to the /webapps/birt_runtime/scriptlib/ folder and restart the runtime deployment application.
With the Hector jars copied in, you can now create your data source by selecting the Cassandra Scripted Data Source data source type and clicking finish. Then, create your Scripted Data Set by creating a new data set using the scripted data source and then defining your fields. Now that you've created your data set, you can now write your script. To get started with this, select your data set in the Data Explorer and then the Script tab under the design layout window.
Now, you just need to connect to your data using the open script function and then map your data to your rows you defined in the fetch script. To test your data set, open the data set and choose the preview results.New Mongo DB Data Source
The BIRT project has been designed to facilitate access to as many data sources as possible. Currently BIRT natively supports Flat File (CSV, SSV, PSV and TSV), JDBC Textual, JDBC Graphical Query Builder, XML, and Web Service data sources. This project provides the ability for BIRT developers to access data contained in MongoDB, a popular NoSQL repository.
To create a MongoDB data set, follow these steps:
First, choose to create a new data source and choose the MongoDB Data Source and hit next. Then, you'll input your connection information, test your connection, and hit finish.
Now that you have your source set up, you'll use it to create a new data set. In the data set wizard, select the mongoDB data source and hit next. Then, choose the collection you wish to use and select your fields. You can also set up command operations for MapReduce, Aggregate, or Run Database Command.
Once you've selected the fields you want and set up your desired command operations, hit finish and preview your results.
If you have questions on any of these, feel free to post questions in the comments section or in the forums.