Over a million developers have joined DZone.

Extend BIRT Interactive Viewer with Row Highlighting [Code]

· Java Zone

Learn more about the advantages of moving from a monolithic to microservices architecture.  Brought to you in partnership with IBM.

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.

From Idea to Application gives you the architecture to quickly build, manage and run a range of applications (web, mobile, big data, new smart devices, etc.) on an open-standard, cloud-based platform. See why developers are using IBM Bluemix. Brought to you in partnership with IBM.


Published at DZone with permission of Michael Singer, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}