Excerpt. © Reprinted by permission. All rights reserved.
About this book
BIRT is a powerful reporting platform that provides end-to-end reporting solutions, from creating and deploying reports to integrating report capabilities into other enterprise applications. Two companion books, BIRT: A Field Guide to Reporting and Integrating and Extending BIRT, cover the breadth and depth of BIRT's functionality.
This book informs report developers about how to write scripts that:
- Customize the report-generation process
- Incorporate complex business logic in their reports
This book also informs application developers about how to:
- Integrate reporting capabilities into other applications
- Extend BIRT functionality
By its very nature, reporting is not a stand-alone technology. It draws on data generated by applications and is frequently integrated tightly within those applications. In some applications, such as performance monitoring, reporting provides the most tangible expression of value. Therefore, a successful reporting platform must emphasize interoperability and extensibility, and, a successful implementation of that platform must always involve some measure of integration and extension.
As you read this book, you will see the significant investment that has been made in BIRT to provide support for interoperability and extensibility. In the area of interoperability, for instance, BIRT supports flexible deployment of its report engine and viewer to a wide variety of J2EE application server environments. Other provisions for interoperability in the BIRT platform include the ability to dynamically build or modify reports from within an application using the design engine application programming interface (API) and the ability to access native data objects using the scripted data source mechanism.
In the area of extensibility, BIRT provides hooks to build upon platform capabilities in the following areas:
- Report Items. New controls may be added to the BIRT designer palette using the report item extension API.
- Data Access. The Open Data Access (ODA) extension provides the means to develop drivers for new, non-JDBC data sources as well as create graphical user interfaces for query specification.
- Rendering. New report output formats or output for specialized devices can be developed using the report rendering extension API.
Who should read this book
This book is intended for people who have a programming background. These readers can be categorized as:
- Embedders and integrators. These individuals work with the software to integrate it into their current application infrastructure.
- Extenders. These individuals leverage APIs and other extension points to add capability or to establish new interoperability between currently disparate components or services.
Contents of this book
This book is divided into several parts. The following sections describe the contents of each of the parts.
Installing and Deploying BIRT
Part I, "Installing and Deploying BIRT," introduces the currently available BIRT reporting packages, the prerequisites for installation, and the steps to install and update the packages. Part I includes the following chapters:
Chapter 1, "Prerequisites for BIRT." BIRT provides a number of separate packages as downloadable archive (.zip) files on the Eclipse web site. Some of the packages are stand-alone modules, others require an existing Eclipse environment, and still others provide additional functionality to report developers and application developers. This chapter describes the prerequisites for each of the available packages.
Chapter 2, "Installing a BIRT Report Designer." BIRT provides two report designers as separate packages, which are downloadable archive (.zip) files on the Eclipse web site. This chapter describes the steps required to install each of the available report designers.
Chapter 3, "Installing Other BIRT Packages." This chapter describes the steps required to install each of the available packages.
Chapter 4, "Updating BIRT." BIRT packages are Eclipse-based, so it is easy to update any of them from earlier releases to release 2.0 or later. This chapter describes how you can install the latest packages without interrupting your work.
Chapter 5, "Deploying a BIRT Report to an Application Server." This chapter introduces the distribution of reports through an application server such as Apache Tomcat, IBM WebSphere, or BEA WebLogic. The instructions in the chapter provide detailed guidance into deploying a BIRT report to Apache Tomcat version 5.5.7. From those instructions, a developer can infer how to deploy to other versions.
Understanding the BIRT Framework
Part II, "Understanding the BIRT Framework," introduces the BIRT architecture and the Report Object Model (ROM) and provides background information that will help programmers design or modify reports programmatically, instead of using the graphical tools in BIRT Report Designer. Part II includes the following chapters:
Chapter 6, "Understanding the BIRT Architecture." This chapter provides an architectural overview of BIRT and its components, including the relationships among the BIRT components and BIRT's relationship to Eclipse and Eclipse frameworks. Architectural diagrams illustrate and clarify the relationships and workflow of the components. The chapter also provides brief overviews of all the major BIRTcomponents.
Chapter 7, "Understanding the Report Object Model." This chapter provides an overview of the BIRT ROM. ROM is a specification for a set of XML elements that define both the visual and non-visual elements that comprise a report design. The ROM specification includes the properties and methods of those elements, and the relationships among the elements.
Scripting in a Report Design
Chapter 10, "Using Java to Write an Event Handler." This chapter discusses how to write a BIRT event handler in Java. BIRT provides Java adapter classes that assist the developer in the creation of Java event handlers. The report developer uses the property editor of the BIRT Report Designer to associate a Java event handler class with the appropriate report element. This chapter contains a tutorial that steps through the Java event handler development and deployment process. This chapter also describes the event handler methods and their parameters.
Integrating BIRT Functionality into Applications
Part IV, "Integrating BIRT Functionality into Applications," describes the public APIs that are available to Java developers, except the extension APIs.Chapter 12. Understanding the BIRT APIs. This chapter introduces BIRT's public API, which are the classes and interfaces in three package hierarchies:
- The report engine API, in the org.eclipse.birt.report.engine.api hierarchy, supports developers of custom report generators.
- The design engine API, in the org.eclipse.birt.report.engine.api hierarchy, supports the development of custom report designs.
- The chart engine API, in the org.eclipse.birt.chart hierarchy, is used to develop a custom chart generator.
Chapter 13, "Programming with the BIRT Reporting APIs." This chapter describes the fundamental requirements of a reporting application and lists the BIRT API classes and interfaces that are used to create a reporting application. This chapter describes the tasks that are required of a reporting application and provides an overview of how to build a reporting application. The org.eclipse.birt.report.engine.api and org.eclipse.birt.report.model.api packages support the process of generating a report from a report design.
Chapter 14, "Programming with the BIRT Charting APIs." This chapter describes the requirements of a charting application, either in a stand-alone environment or as part of a reporting application. The org.eclipse.birt.chart hierarchy of packages provides the charting functionality in BIRT. By describing the fundamental tasks required of charting applications, this chapter introduces the API classes and interfaces that are used to create a chart.
Working with the Extension Framework
Part V, "Working with the Extension Framework," shows Java programmers how to add new functionality to the BIRT framework. By building on the Eclipse platform, BIRT provides an extension mechanism that is familiar to developers of Eclipse plug-ins. This part also provides information about how to build the BIRT project for developers who need access to the complete BIRT open source code base. Part V includes the following chapters:
Chapter 15, "Building the BIRT Project." This chapter explains how to download BIRT 2.0.1 source code and build the BIRT project for development. This chapter describes how to configure an Eclipse workspace, download BIRT and Data Tools Platform (DTP) source code from the Eclipse Concurrent Versions System (CVS) repository, and build the BIRT report and web viewers.
Chapter 16, "Extending BIRT." This chapter provides an overview of the BIRT extension framework and describes how to use the Eclipse Plug-in Development Environment (PDE) and the BIRT extension points to create, build, and deploy a BIRT extension.
Chapter 17, "Developing a Report Item Extension." This chapter describes how to develop a report item extension. The rotated text extension example is a plug-in that renders the text of a report item as an image. The extension rotates the image in the report design to display the text at a specified angle. This chapter describes how to build the rotated text report item plug-in and add the report item to the BIRT Report Designer using the defined extension points.
Chapter 18, "Developing a Report Rendering Extension." This chapter describes how to develop a report rendering extension. The Comma-Separated Values (CSV) extension example is a plug-in that writes the table data in a report to a file in CSV format. This chapter describes how to extend the emitter interfaces using the defined extension points to build and deploy a customized report rendering plug-in that runs in the BIRT Report Engine environment.
Chapter 19, "Developing an ODA Extension." This chapter describes how to develop several types of DTP ODA extensions. The CSV ODA driver example is a plug-in that reads data from a CSV file. The Hibernate ODA driver example uses Hibernate Query Language (HQL) to provide a SQLtransparent extension that makes the ODA extension portable to all relational databases. This chapter shows how to develop an ODA extension to the BIRT Report Designer 2.0.1 user interface that allows a report designer to select an extended ODA driver. This chapter also describes how to implement an extension to an ODA JDBC driver to use a supplied connection.
The glossary contains terms that are useful to understanding all parts of the book.