Skip to main content
Jump to: navigation, search

RCP Integration (BIRT)

To integrate the BIRT viewer in an RCP application, you need to add all BIRT dependencies to your plugins and in your .product file for the build.

Depending on your product configuration type (feature based, or plugin based) it can be tricky to find out all these needed dependencies, this article will help you make the BIRT WebViewer work in your application.

Note this article has been created for BIRT version 2.5.2 it may need some adjustments for other versions.

Plugin Dependencies

The first step is to add the BIRT dependencies to your plugin, so you can access and use the WebViewer and the BIRT APIs in your plugin.

Add these dependencies :

org.eclipse.birt.report.viewer;bundle-version="2.5.2"
org.eclipse.core.resources
org.eclipse.birt.report.engine.script.javascript
org.eclipse.birt.report.data.oda.jdbc
org.eclipse.datatools.connectivity.oda
org.eclipse.datatools.connectivity.oda.consumer
org.eclipse.birt.report.engine.emitter.html,
org.eclipse.birt.report.engine.emitter.html.config,
org.eclipse.birt.report.engine.emitter.pdf,
org.eclipse.birt.report.engine.emitter.pdf.config

Note here we assume that you are using a JDBC ODA driver, you may need to add a different oda plugin. The emitters are important because you need at least the HTML emitter to use the WebViewer.

Build

If you can use the BIRT viewer inside your application, you may want to have it working properly in the final builded RCP application. Here are the different product build scenarios.

Before exporting you can use "Launch an Eclipse application" from the main product deitor page, that will synchronise a Run Configuration with the defined plugins, and launch your application. If it works, you have good chances that your build will be good. If not don't even try to export, because you are missing some plugins. You can edit your run configuration and use "Validate Plugins" to see what is missing.

Plugin Based Product

If your product is based on plugins, it's the easy way because you can automate the dependency analysis.

  • open your .product file with the product editor
  • Go to the Dependencies tab
  • Add your plugin that depends on org.eclipse.birt.report.viewer
  • Click on "Add Required Plugins" and all the needed plugins will be added.
  • Export your product.

Feature Based Product

If your product is based on features, you can not automate the dependency analysis, and you have to know all the birt dependencies. You can use this provided feature file the provides all the needed dependencies.

  • open your .product file with the product editor
  • Add this feature in the Dependencies tab.
  • Export your product.

TroubleShooting

TODO : common errors without javascript support or without needed emitters.

Back to the top