Adding support for BIRT reports to a project

Before your EGL code can create BIRT reports, you must add support to your project. You need to add support only once for each project, and you do not need to remove support if you stop using BIRT reports.

You can add support for BIRT as you create a project. On the second screen in the New EGL Project wizard, check Show Advanced Settings, and at the next screen, select the EGL with BIRT report support check box.

Alternatively, you can add support for an existing project:

  1. In the Project Explorer view, right-click your EGL project and then click Properties. The Properties window opens.
  2. In the Properties window, click EGL Project Features.
  3. Under EGL Project Features at the right side of the window, select the EGL with BIRT report support check box. If this check box is already selected, leave it selected.
  4. Click OK.

Also, if you need to reference graphics that are stored in the BIRT resource folder, click Windows -> Preferences ->Report Design -> Resource and specify the folder. For additional details on graphics and BIRT, see "External types in BIRT report-layout event handler"; in particular, the section on ImageInstance.

Adding support for PDF reports

If you want to export reports in Portable Document Format (PDF), you have an additional step after adding support for BIRT reports.

For a General project, do as follows:

  1. Download the file iText-1.3.jar from the following website:http://prdownloads.sourceforge.net/itext.
  2. In the Project Explorer view, right-click your project and then click Properties.
  3. In the Properties window, click Java Build Path.
  4. On the Libraries tab, click Add External JARs.
  5. In the JAR Selection window, select the iText-1.3.jar file that you just downloaded and click Open.

    Now the iText-1.3.jar file is listed under JARs and class folders on the build path.

  6. Click OK.
For a Plug-in project, do a series of steps outside of the Integrated Development Environment:
  1. Download the file iText-1.3.jar from the following website:http://prdownloads.sourceforge.net/itext.
  2. Find the product installation location for IBM® shared code and then the plugins directory; for example:
    C:\Program Files\IBM\SDP70Shared\plugins
  3. In the plugins directory, find the most recent version of the directory for the plug-in com.lowagie.itext; for example
    com.lowagie.itext_1.3.0.v20070205-1728

    As shown, the name is followed by a version number and timestamp.

  4. Ensure that a lib directory is within the directory for the plug-in com.lowagie.itext. If a lib directory is not there, add it; for example:
    com.lowagie.itext_1.3.0.v20070205-1728\lib
  5. Copy the file iText-1.3.jar into the lib directory.

Setting the build descriptor option birtEngineHome

Before you can work with BIRT, you need to download BIRT runtime code and set the birtEngineHome build descriptor option, but only if you are working in a General project. Here are the steps:
  1. Go to http://www.eclipse.org/birt
  2. Access the runtime code of interest. At this writing, the procedure is as follows:
    1. On the left of the page, click Download
    2. At the next page, go to the More Downloads section and click Recent Builds Page
    3. At the next page, go to the Latest Releases section and, in the Build Name column, click 2_3_0
    4. At the next page, go to the Report Engine section and click birt-runtime-2.3.0.zip
    5. At the next page, click a mirror location and follow the displayed instructions to download the code
    Note: EGL supports only the following versions of BIRT:
    Table 1. EGL and BIRT version compatibility
    EGL version BIRT version
    7.5 2.3.0
    8.0 2.6.1
  3. Unzip the downloaded code into a directory of your choice; for example, C:\birt
  4. In the project build descriptor, set the birtEngineHome option to the fully qualified path of the ReportEngine directory; for example, C:\birt\birt-runtime-2_3_0\ReportEngine

Accessing the non-EGL jar files needed at deployment time

To deploy code that runs a BIRT report, ensure that you deploy a set of jar files that are found in the ReportEngine\lib subdirectory of the directory that contains the BIRT runtime code; for example, in C:\birt\birt-runtime-2_3_0\ReportEngine\lib.

These jar files are in the subdirectory:
  • commons-codec-1.3.jar
  • coreapi.jar
  • engineapi.jar
  • js.jar
  • modelapi.jar
  • scriptapi.jar
For a description of how to deploy the files, see the Generation Guide section "Preparing for Deployment".

Feedback