Recent posts

You are browsing Designing BIRT Reports

Learn Advanced BIRT Report Design Techniques at WJAX Developer Conference in Munich

I was approved to talk at the WJAX developer conference in Munich Germany this week.  For those of you attending this conference, I’ll be teaching the session titled Advanced BIRT Report Customization on Wednesday, November 6th, at 830am.  This session will focus on BIRT report scripting, report reuse with libraries and templates, and internationalization of report content.  For those of you not attending the conference I’ll post the slides and examples on BIRT Exchange as soon as the conference is over.


Flash Maps in a BIRT Report

This Friday, October 17th, Mark Gamble from Actuate Corporation will demonstrate the Flash map capability available soon with the Actuate BIRT Designer.  This is short, 30 minute, webinar that is part of the BIRT Exchange developer webinar series.

Actuate BIRT Flash Map 

More information and registration can be found at the link below.

Incorporating Flash-based Geospatial Visualizations into BIRT Reports
Oct 17, 2008 - 09:00 am

An archive of this webinar will be available from the same link a few days after the webinar is completed. 


Second Edition BIRT Books Now Available

BIRT Book Field Guide      BIRT Book Integrating

Two popular books, BIRT: A Field Guide to Reporting and Integrating and Extending BIRT, have been updated.  These books are now on their second edition and each include many more pages and examples.

The first book, BIRT: A Field Guide to Reporting, includes 109 more pages than the previous edition and covers several of the latest product features, including cross tabs and OLAP cubes, new chart types, web services as a data source, new report output formats, using CSS files, and localization of reports.  We found the second edition of this book at Amazon and informIT.

The second book, Integrating and Extending BIRT, includes 136 more pages and includes several new architectural diagrams and covers report and chart scripting, BIRT tag libraries, using the BIRT Web Viewer, JNDI support, an ODA plugin example, and lots more.  We also found the second edition of this book at Amazon and informIT.


Webinar: Using the Web-Based BIRT Report Designer

This Friday, July 11th, Rob Murphy from Actuate will be demonstrating how to use the web-based BIRT report designer.  This webinar is part of the BIRT Exchange webinar series which are only 30 minutes in length every other week.

Sign up for the webinar or get more information at BIRT Exchange.

The webinar will be recorded and available at the same link above a few days after the webinar.


Get up to speed with BIRT 2.3?

There are lots of improvements coming with BIRT 2.3 like the new Javascript debugger, many crosstab improvements, the SQL Query Builder prototype, bi-directional support for right-to-left languages, a new horizontal page break property, and much more.

To see BIRT 2.3 in action, plan to attend one of the following BIRT 2.3 events taking place this week:

  • On Tuesday, June 24th at 9am PDT, Jason Weathersby will be presenting an hour long webinar hosted by live.eclipse.org on the BIRT 2.3 new features. More information and sign up here.
  • On Friday, June 27th at 9am PDT, I will be presenting a 30 minute webinar showing the BIRT 2.3 New Features to the members of BIRT Exchange. More information and sign up here.


Using the BIRT Design Engine APIs

The BIRT Design Engine APIs (DEAPI) can be used to generate the XML BIRT report design file through Java code.  You can also use the DEAPI in scripts to modify the report design on the fly before the report is executed.

This Friday, June 13th at 9am Pacific Time, Jason Weathersby will be discussing the Design Engine API and will be showing some real world examples in a webinar through BIRT Exchange.  This is a very short webinar (only 30 minutes) so you might want to log in a few minutes early so you don’t miss anything. 

Registration is required.  More information and sign up page available here.


New BIRT Book Reviewed

I was asked to review a new BIRT book by John Ward titled, Practical Data Analysis and Reporting with BIRT. This was a book that I had already downloaded and intended to read as mentioned in a previous post. As I started reading the book, I realized that this was a great introductory BIRT book. For that reason, I decided to have a new employee, who needed to get up to speed with BIRT quickly, use this book as his first training exercise. 

His overall impression was good and he thought this book was a nice starting point for a new BIRT user. When asked to rate this book from 1-10 on how well the book did for training a new user, he assigned this book an 8 out of 10. Below are a few relevant notes by chapter that were made while going through the book.
Chapter 1 - Introduction
Good introduction to Business Intelligence, where BIRT came from, and what it is.

Chapter 2 - Installing BIRT
This chapter contains easy to follow instructions for installing BIRT using several different methods.

Chapter 3 - The BIRT Environment and Your First Report
The author does a good job of showing readers what BIRT can do/give them in a report. The description of the Report Designer window is a bit confusing as you cannot see anything the author describes until after you have created a report. It might be better to create the report first and then go back and read the designer description.

Chapter 4 - Visual Report Components
Nice use of examples to show basic visual design components for reports. The chapter is also a very helpful introduction to some of the basic tools of BIRT.

Chapter 5 - Working with Data
This was a great chapter on BIRT Data Sources however some of the XML or report design examples talked about in this chapter assume you have these files. As a result, I had to type up the sample XML and flat files examples in order to complete the steps.

Chapter 6 - Report Parameters
Some confusion with the screenshot in step 7 of Cascading Parameters. This picture/figure looks like it belongs with step 12, where it also appears. Other than that little confusion, the author offers pretty straightforward examples for new users of BIRT related to parameters.

Chapter 7 - Report Projects and Libraries
Couldn’t do shared report example under Other Project Options as I don’t have a username and password authentication to a CVS server, so had to skip that part. Otherwise, good information on BIRT report projects and libraries.

Chapter 8 - Styles, Themes, and Templates
Good informative examples of how to create custom styles for your reports to make them unique to your company and fairly straightforward examples of templates, styles, and themes.

Chapter 9 - Charts, Hyperlinks, and Drill-Downs
Nice, simple charting, hyperlink, and drill-through examples. In this chapter, the author seemed to assume that the reader has totally grasped everything that was previously mentioned as some of the step details weren’t explained as well..  I found myself going back to previous chapters to remind myself how to do some things.

Chapter 10 - Scripting and Event Handling
I had some trouble with scripting in this chapter and couldn’t get the sorting script to work. The rest of the Javascript examples worked fine. I also had a bit of a problem with the Java objects event handler example. It could have been related to a typo or something similar since I had to type the Java code from reading the book.

Chapter 11 - Deployment
Good short examples/explanations of deployment options with BIRT and their versatility. This chapter shows how to deploy with the BIRT Viewer, running from the command line, and using the Report Engine API. I really wish I could have downloaded some of these examples instead of typing them.

Chapter 12 - Practical Example
Nice in-depth example of how BIRT can be used in real world applications. I didn’t actually do this example since I didn’t have Bugzilla or MySQL installed, but I understood the example from what I could read.


BIRT Library Inheritance

In object-oriented development, it is understood that the term inheritance applies when one object can extend another allowing for certain generalized properties to be ‘inherited’ by the new object.  For example, if ‘Fruit’ was an object, then ‘Apple’, ‘Banana’, and ‘Orange’ could extend the ‘Fruit’ object inheriting the natural characteristics of all fruit, plus the ability for each new object to add new characteristics. 

BIRT Library Inheritance

I recently discovered that this same concept can be applied to BIRT Libraries.  I may want to have a generalized set of items that I will use on all my reports, but some of these items may need to be customized for each project that uses them.  For example, the company header for all of my reports should use the same logo and font style but each project may get to define the background color of the header.  

For this example, I created one common library using the BIRT Designer.  Within the library, I created a company header in a grid, with a logo and a label.

I can then create my individual project libraries.  After creating the library, open the Library Explorer view.  You should be able to see your common library in this view while your new project library is still opened.  To extend an item from the common library, drag the item from the Library Explorer view to the Report Outline of your project library.  You can now customize that item within the project library.  For my example, I simply changed the background color of the grid to be a different color for each project.

Now I can create a report using an item from my project library.  If something changes in the common library, like a new font style or company logo, that change will be reflected in all the reports that use these libraries.

 


Using Properties Files to Localize BIRT Reports

I’ve received a few questions asking how to localize BIRT reports.  BIRT reports can be localized so that your users in offices around the world can see a report in their desired language and formating.  BIRT can automatically take care of the number, date, and currency formatting but there are other parts of the report to consider that would normally consist of static text.  These ncluding labels or text elements within a report, table and column headers, chart titles, etc.  For these elements, we need to replace the static text with external text from a properties file.

To get started, I created a couple of .properties file.  You will need one property file for each locale you plan to support.  For our example, I created one called MyResources_us_EN.properties and MyResources_fr.properties.  These are just text files and contain name value pairs like below.

welcome=Hello
goodbye=Later

…and…

welcome=Bonjour
goodbye=Au revoir

Once you have the properties files created, add them to your report project.  You can now select one of the properties files in the Resource File property of the report design (screenshot below).

 Set Resource File

Now that the properties file has been set, you can assign ‘keys’ to various controls within the report.  To add a key to a label, select the label and then Localization on the Property Editor tab.

Assign resource key

Press the […] button and you can pick the key to use from a list

Pick resource key

Perform these same steps for any other labels within the report.  You can use external text within the chart as well, anywhere you see the following icon.

External Text

Pressing this button will invoke a list like below where you can pick the resource key to use.

Select external text

If you need to externalize text that comes from a database, then you will need to use the mapping feature.  For example, if I want to localize the text from a group header and I want to replace the office number (1 through 7) with the words “First Office” for English and “Premier Bureau” for French, then I start by selecting the Office Number data field.  On the Map tab in the Property Editor, press the Add button to create a map rule.

BIRT Create Map Rule

In this example, when the Office Code field equals Office # 1, then replace the text with the value from our properties file that matches ‘1′.  Create a unique mapping for each value you want to externalize.

Once you have created all your mappings and have assigned the keys to each label or chart, then you are ready to test that it all works.  In order for the resource files to get selected correctly at runtime, we have to remove the locale specific information from the name of our resources file.  You do this by selecting the whitespace on the report again, and then on the Resources tab.  Remove ‘_us_EN’ from the name of the resource file so that it now reads ‘MyResources’ without any locale information at the end.

To test for different languages while in the BIRT Designer, select Window | Preferences | Report Design | Preview.  I’ll select French since that was the only other locale that I have a properties file for.

BIRT Preview Language Selection

Now when I run the report, my labels are replaced, the chart title is replaced, and the group header fields have been replaced.

BIRT Report Preview

If you are trying to set the name of the properties file or assign the resource keys with scripting, then you can do something like below in the beforeFactory event:

   var rr = reportContext.getReportRunnable();
   rr.designHandle.setProperty(”includeResource”, “MyResources”);
   rr.getDesignInstance().getLabel(”GoodbyeLabel”).textKey = “goodbye”;

… or in the onPrepare event of a label control, you can use:

   this.textKey = “welcome”;

If you are using the REAPI to set the location of the resource file… or assign keys, then you can use code similar to:

   config.setResourcePath(”C:/work/eclipse/BIRT_221/resources”);

   task.setLocale(ULocale.FRENCH); 

   IReportRunnable design = null;
   ReportDesignHandle dh = null;

   design = engine.openReportDesign(”C:/workspace_221/birt/Localization.rptdesign”);
   dh = (ReportDesignHandle) design.getDesignHandle();
 
   LabelHandle mylabel = (LabelHandle) dh.findElement(”LastLabel”);
   mylabel.setTextKey(”welcome”);

All of these examples above can be downloaded from:

http://www.birt-exchange.com/modules/wfdownloads/singlefile.php?cid=2&lid=351


New BIRT Book Available

I saw an announcement for a new BIRT book called “Practical Data Analysis and Reporting with BIRT“. It was written by John Ward who frequently blogs about BIRT on his blog, “The Digital Voice“. I downloaded the eBook version as PDF so I could read it on the plane this weekend to EclipseCon. So far, I’ve only read the introduction, table of contents, and skimmed the rest, but I can see it is written in a tutorial style with lots of screenshots to help along the way. John Graham is also reading this book and has posted a very thorough review of his progress on his blog.

For those of you in the market for books on BIRT, there are also two others available from Amazon at the links below.

BIRT: A Field Guide to Reporting

Integrating and Extending BIRT


Authors