THIS ARTICLE IS STILL IN PROGRESS - PLEASE SEND ANY FEEDBACK TO bmuskalla (at) eclipsesource.com
Besides a rich user interaction many applications need to display a big amount of data sets as diagrams or reports as part of their applications. In order to bridge the gap the BIRT project was created as part of the eclipse ecosystem. BIRT is an open source Eclipse-based reporting system that integrates with your Java/J2EE application to produce compelling reports. That BIRT integrates well with classic RCP applications is a well known fact. But the need for rich internet applications is still growing. And here the RAP comes into play. As a platform for developing Web 2.0 applications with the same patterns as for RCP it paves the way for single sourcing applications running on both platforms. In this talk we will show how to integrate diagrams and reports known from BIRT into RAP applications. Topics covered include how to setup the environment to let BIRT and RAP play well together. In addition we will give advices how to use the reports inside RAP applications and which problems may arise. As a final outcome of we will know everything to bring reporting capabilities into RAP applications.
The first thing we need to do is to mix up a target which contains both runtimes: RAP and BIRT. We need to download both runtimes first:
When merging the two runtimes together, we should be sure that no bundle is available twice as this results in same strange errors during runtime. So first step is to remove all the duplicate bundles.
RAP provides them in version 4, the BIRT runtime needs them in version 3. So be sure that you include version 3 of the ICU bundles in order to get the constraints resolved for both runtimes.
Under normal circumstances you create your chart object, fill it with some data and draw it on some surface. As RAP does not support any drawing capabilities we need to adjust the last step a little bit.
Use the right renderer
Instead of using the SWT renderer, we just use a simple file renderer (eg. PNG) to draw the chart.
In RAP enviroments we should never use the
org.eclipse.birt.chart.device.swt. Instead we can use the simple image renderes found in