Report Engine API
Embedding the Report Engine API into our application requires a little knowledge of the inner workings of BIRT. The API is beyond the scope of this book, but we will get a little view of how to create a simple report executor application.
For this application to work, we need to have Java 1.4 or higher set up for BIRT 2.2 and below, and Java 1.5 set up for BIRT 2.3 and above, and have the BIRT runtime set up and visible in our classpath. We will use the Apache Commons CLI to handle the command line options. The following does not take into account parameters; it simply demonstrates how to instantiate the Report Engine API.
package com.birt_book; import java.util.HashMap; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; import org.apache.commons.cli.PosixParser; import org.eclipse.birt.core.exception.BirtException; import org.eclipse.birt.core.framework...