Integrating and Extending BIRT
The world-wide developer community has downloaded over three million copies of BIRT (Business Intelligence and Reporting Tools) from the Eclipse web site. Built on the open-source Eclipse platform, BIRT is a powerful reporting system that provides an end-to-end solution, from creating and deploying reports to integrating report capabilities in enterprise applications.

The second of a two-book series on business intelligence and reporting technology, Integrating and Extending BIRT, Second Edition introduces programmers to BIRT architecture and the reporting framework. BIRT technology makes it possible for a programmer to build a customized report using scripting and BIRT APIs. A programmer can also extend the BIRT framework by creating a new plug-in using the Eclipse Plug-in Development Environment. This book provides extensive examples on how to build plug-ins to extend the features of the BIRT framework. The source code for these examples is available for download.

The topics discussed include
  • Installing and deploying BIRT
  • Deploying a BIRT report to an application server
  • Understanding BIRT architecture
  • Scripting in a BIRT report design
  • Integrating BIRT functionality into applications
  • Working with the BIRT extension framework

This second edition, revised and expanded, adds the following new content
  • Updated architectural diagrams
  • Expanded scripting examples
  • Tag library descriptions
  • In-depth description of BIRT Web Viewer
  • Configuring BIRT to use a JNDI connection
  • XML report rendering plug-in example
  • Fragment plug-in localization example
  • Open Data Access (ODA) plug-in example implementing the new Data Tools Platform (DTP) design and run-time wizards

1100164117
Integrating and Extending BIRT
The world-wide developer community has downloaded over three million copies of BIRT (Business Intelligence and Reporting Tools) from the Eclipse web site. Built on the open-source Eclipse platform, BIRT is a powerful reporting system that provides an end-to-end solution, from creating and deploying reports to integrating report capabilities in enterprise applications.

The second of a two-book series on business intelligence and reporting technology, Integrating and Extending BIRT, Second Edition introduces programmers to BIRT architecture and the reporting framework. BIRT technology makes it possible for a programmer to build a customized report using scripting and BIRT APIs. A programmer can also extend the BIRT framework by creating a new plug-in using the Eclipse Plug-in Development Environment. This book provides extensive examples on how to build plug-ins to extend the features of the BIRT framework. The source code for these examples is available for download.

The topics discussed include
  • Installing and deploying BIRT
  • Deploying a BIRT report to an application server
  • Understanding BIRT architecture
  • Scripting in a BIRT report design
  • Integrating BIRT functionality into applications
  • Working with the BIRT extension framework

This second edition, revised and expanded, adds the following new content
  • Updated architectural diagrams
  • Expanded scripting examples
  • Tag library descriptions
  • In-depth description of BIRT Web Viewer
  • Configuring BIRT to use a JNDI connection
  • XML report rendering plug-in example
  • Fragment plug-in localization example
  • Open Data Access (ODA) plug-in example implementing the new Data Tools Platform (DTP) design and run-time wizards

52.99 In Stock
Integrating and Extending BIRT

Integrating and Extending BIRT

Integrating and Extending BIRT

Integrating and Extending BIRT

eBook

$52.99 

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

The world-wide developer community has downloaded over three million copies of BIRT (Business Intelligence and Reporting Tools) from the Eclipse web site. Built on the open-source Eclipse platform, BIRT is a powerful reporting system that provides an end-to-end solution, from creating and deploying reports to integrating report capabilities in enterprise applications.

The second of a two-book series on business intelligence and reporting technology, Integrating and Extending BIRT, Second Edition introduces programmers to BIRT architecture and the reporting framework. BIRT technology makes it possible for a programmer to build a customized report using scripting and BIRT APIs. A programmer can also extend the BIRT framework by creating a new plug-in using the Eclipse Plug-in Development Environment. This book provides extensive examples on how to build plug-ins to extend the features of the BIRT framework. The source code for these examples is available for download.

The topics discussed include
  • Installing and deploying BIRT
  • Deploying a BIRT report to an application server
  • Understanding BIRT architecture
  • Scripting in a BIRT report design
  • Integrating BIRT functionality into applications
  • Working with the BIRT extension framework

This second edition, revised and expanded, adds the following new content
  • Updated architectural diagrams
  • Expanded scripting examples
  • Tag library descriptions
  • In-depth description of BIRT Web Viewer
  • Configuring BIRT to use a JNDI connection
  • XML report rendering plug-in example
  • Fragment plug-in localization example
  • Open Data Access (ODA) plug-in example implementing the new Data Tools Platform (DTP) design and run-time wizards


Product Details

ISBN-13: 9780132702232
Publisher: Pearson Education
Publication date: 07/18/2008
Series: Eclipse Series
Sold by: Barnes & Noble
Format: eBook
Pages: 724
File size: 37 MB
Note: This product may take a few minutes to download.
Age Range: 18 Years

About the Author

The authors are members of the extended BIRT development team and have backgrounds in both computer science and technical writing. Collectively, they have many years of experience in technical consulting, training, writing, and publishing about reporting, business intelligence tools, and database technologies.

Read an Excerpt

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:

  • Deploy reports
  • 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.
  • Complex Logic. Event handlers written in JavaScript or Java may be included in the generation or presentation phase of report or chart execution to incorporate custom logic required by the application.
  • 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.

To write scripts in report design, you need knowledge of JavaScript or Java. More advanced tasks, such as extending BIRT's functionality, require Java development experience and familiarity with the Eclipse platform.

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

Scripting in a Report Design

Part III, "Scripting in a Report Design," describes how a report developer can customize and enhance a BIRT report by writing event handler scripts in either Java or JavaScript. Part III includes the following chapters:

Chapter 8, "Using Scripting in a Report Design." This chapter introduces the writing of a BIRT event handler script in either Java or JavaScript, including the advantages and disadvantages of using one language over the other. BIRT event handlers are associated with data sets, data sources, and report items. BIRT fires specific events at specific times in the processing of a report. This chapter identifies the events that BIRT fires and describes the event firing sequence.

Chapter 9, "Using JavaScript to Write an Event Handler." This chapter discusses the coding environment and coding considerations for writing a BIRT event handler in JavaScript. This chapter describes several BIRT JavaScript objects that a developer can use to get and set properties that affect the final report. The BIRT JavaScript coding environment offers a pop-up list of properties and functions available in an event handler. A JavaScript event handler can also use Java classes. This chapter includes a tutorial that describes the process of creating a JavaScript event handler.

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.

Chapter 11, "Using a Scripted Data Source." BIRT supports getting data from any data source that can be processed with Java or JavaScript. To use a scripted data source in a BIRT report, the report developer implements an open and a close method for the data source and an open, a fetch, and a close method for the data set. A scripted data source can be an EJB, an

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.

Table of Contents

Foreword               xix
Preface                   xxi
Acknowledgments               xxix


Part I: Installing and Deploying BIRT               1
Chapter 1: Prerequisites for BIRT                    3

Downloading Eclipse BIRT components             3
BIRT Report Designer software requirements            5
About types of BIRT builds              7

Chapter 2: Installing a BIRT Report Designer                9
Installing BIRT Report Designer Full Eclipse Install             9
Installing BIRT RCP Report Designer                  10
Troubleshooting installation problems                   11
Installing a language pack                 13
Updating a BIRT Report Designer installation              14
Updating BIRT RCP Report Designer installation                15

Chapter 3: Installing Other BIRT Packages                     17
Installing Chart Engine                      17
Installing BIRT Data Tools Platform Integration            19
Installing BIRT Demo Database                  19
Installing Report Engine                  21
Installing BIRT Samples                  23
Installing BIRT Source Code                23

Chapter 4: Deploying a BIRT Report to an Application Server           27
About application servers               27
Placing the BIRT report viewer on an application server               28
Placing fonts on the application server                     33
Viewing a report using a browser                    33
Using connection pooling on Tomcat                    34

Chapter 5: Using Eclipse BIRT Web Viewer                     39
Understanding Eclipse BIRT Web Viewer                        39
Understanding Web Viewer architecture                            44
Using the Web Viewer Deployment wizard                    61

Part II: Understanding the BIRT Framework                   81
Chapter 6: Understanding the BIRT Architecture           83

Understanding the BIRT integration                     83
About the BIRT applications                     87
About the BIRT engines and services                88
About the types of BIRT report items               90
About the Report Object Model (ROM)                  91
About the types of BIRT files                   91
About custom Java applications                93
About extensions to BIRT                       93

Chapter 7: Understanding the Report Object Model            95
About the ROM specification              95
About the ROM schema                       98
About the rom.def file                           98
About the primary ROM elements         101
About the report item elements               102
About the data elements                  103

Part III: Scripting in a Report Design                        105
Chapter 8: Using Scripting in a Report Design               107

Overview of BIRT scripting                        107
Events overview                   108
Event order sequence              115

Chapter 9: Using JavaScript to Write an Event Handler                        127
Using BIRT Report Designer to enter a JavaScript event handler                 127
Using the reportContext object                130
Using the this object                   135
Using the row object                   138
Getting column information                139
Getting and altering the query string                     140
Changing the connection properties of a data source                  140
Getting a parameter value                       141
Determining method execution sequence                    142
Tutorial 1: Writing an event handler in JavaScript                      144
JavaScript event handler examples                    149
Calling Java from JavaScript                        151
Calling the method of a class that resides in a plug-in               153

Chapter 10: Using Java to Write an Event Handler                              155
Writing a Java event handler class                    155
Writing a Java event handler                     161
Understanding the BIRT interfaces                      166
Java event handler example                    173
Debugging a Java event handler                  180

Chapter 11: Working with Chart Event Handlers                          183
Chart events overview                183
Understanding when chart events trigger                   185
Writing a Java chart event handler                   204
Writing a JavaScript chart event handler                   208
Using the simplified charting API                         211

Chapter 12: Accessing Data Programmatically                    217
Using a Scripted Data Source                     217
Tutorial 2: Creating and scripting a scripted data source                    219
Creating a web services data source using a custom connection class                   228

Part IV: Integrating BIRT Functionality into Applications                233
Chapter 13: Understanding the BIRT APIs                     235

Package hierarchy diagrams                    236
About the BIRT Report Engine API                      237
About the Design Engine API                244
About the BIRT Chart Engine API                         .257

Chapter 14: Programming using the BIRT Reporting APIs               275
Building a reporting application                   276
Generating reports from an application                   279
Programming with a report design                    302

Chapter 15: Programming using the BIRT Charting API                    321
About the chart engine contents                   321
About the environment for charting application                322
Using the charting API to modify an existing chart            324
Using the charting APIs to create a new chart                330
Using a chart item in a report design                   336
Using the BIRT charting API in a Java Swing application                 345
Understanding the chart programming examples                      351

Part V: Working with the Extension Framework                    359
Chapter 16: Building the BIRT Project                      361

About building the BIRT project                       361
Installing a working version of BIRT                 362
Configuring the Eclipse workspace to compile BIRT                  362
Downloading and extracting the correct version of the BIRT source code             364
Importing, building, and testing the BIRT project                   364
Building new JAR files to display BIRT output                  367

Chapter 17: Extending BIRT                      369
Overview of the extension framework                      369
Understanding the structure of a BIRT plug-in                       370
Working with the Eclipse PDE                         377
Creating the structure of a plug-in extension                     381
Creating the plug-in extension content                      385
Building a plug-in extension                       390
Deploying the extension plug-in                      393
Downloading the code for the extension examples                     398

Chapter 18: Developing a Report Item Extension                       399
Understanding a report item extension                      399
Developing the sample report item extension                   401
Understanding the rotated label report item extension                     418
Deploying and testing the rotated label report item plug-in                  428

Chapter 19: Developing a Report Rendering Extension               433
Understanding a report rendering extension                433
Developing a CSV report rendering extension                   434
Developing an XML report rendering extension                    462

Chapter 20: Developing an ODA Extension                 477
Understanding an ODA extension                     478
Developing the CSV ODA driver extensions                   479
Implementing the CSV ODA driver plug-in                      481
Understanding the sample CSV ODA driver extension                    491
Developing the CSV ODA UI extension                         500
Understanding the sample CSV ODA UI extension                     509
Testing the CSV ODA UI plug-in                    519
Developing a Hibernate ODA extension                      524

Chapter 21: Developing a Fragment                         571
Understanding a fragment                571
Developing the sample fragment                572
Creating a fragment project                573
Understanding the sample fragment                  576
Building, deploying, and testing a fragment                577

Glossary                                 583

Index                                       645


From the B&N Reads Blog

Customer Reviews