Over a million developers have joined DZone.

Extend BIRT Interactive Viewer with Row Highlighting [Code]

DZone's Guide to

Extend BIRT Interactive Viewer with Row Highlighting [Code]

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

Originally Written by Fred Sandsmark

First in a series.

Actuate’s BIRT Interactive Viewer is the go-to product for putting personalized BIRT content in all users’ hands. To make this hard-working product even better, two of Actuate’s BIRT engineers, Clement Wong and Bill Clark, are creating a suite of free extensions to BIRT Interactive Viewer that can improve both its appearance and usefulness. We’ll show off several of these extensions over the coming weeks on this blog.

Extending BIRT Interactive Viewer is a snap with Actuate’s JavaScript API. You can create any visualization imaginable using a resultset that you can access with a single JavaScript API call.

The first extension, enabled with just a few lines of jQuery code, adds row highlight capability to tables created for BIRT Interactive Viewer. As the user’s pointer moves up and down the table, the row is highlighted – a big help if the user is scanning a single column of a wide table. The result looks like this:

highlightTable yellow with cursor

To add this effect to your BIRT tables, simply add the following script in the table header as a text item. Set the item type as HTML.

<div id="here"></div> 
<script type="text/javascript"> 

var allCells = $("#here").closest("table").find( "td" ); 

.on("mouseover", function() {
 var el = $(this);
 .on("mouseout", function() {


Copy the above, or you can download working Report Design source code here: TableRowHighlight

Beyond pure simplicity, this method has some nice features:  You can add it to new or existing reports very easily.  It’s simple to change the highlight color to match your existing UX. All other BIRT Interactive Viewer functions (like sorting columns) are unaffected.

As noted, this is just the first of a series of BIRT Interactive Viewer Extensions. The next Extension we’ll share, also created using jQuery, adds a fully configurable pop-up dialog box to a BIRT table. That script will be shared on this blog soon, so please subscribe (at left) to be notified of new entries. And let us know in the comments what other additions you’d like to see to BIRT Interactive Viewer.

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}