Tuesday, March 09, 2010

BIRT 2.5.2 Enhancements

As BIRT 2.5.2 was released recently, I wanted to post on some of the new features available in the release. BIRT 2.5.2 represents a maintenance release, which is generally dominated with bug fixes and not new enhancements, but this release does have a few that are worth noting.

SQL Query Builder
The SQL Query Builder is now directly available without creating a connection profile. When adding a new data source, the query builder is listed as one of the data sources available.



After selecting the Query Builder data source you are prompted with a list of available databases. Once you select the type of database you can then specify the specific driver and connection properties that will be used.



One of the advantages to using this driver is that the jar location of the driver is a data source property and can be changed using Property Binding or an Event Handler Script.

<property name="jarList">C:\birt\mysql\mysql-connector-java-5.0.4-bin.jar</property>

After the data source is created, you create a dataset just like you would with any other BIRT data source. The editor allows graphic query creation as shown in the following image.




Designer Classpath Configuration

In prior releases of BIRT, the classloader while in the designer would search all projects within the workspace to locate a class that was used within the design. This would happen for classes invoked used in expressions or JavaScript event handlers. Event handlers written in Java where located in this fashion as well. In BIRT 2.5.2 you can now configure the classpath for the workspace or for the individual project that BIRT will use. To set this preference select the window->preferences->Report Design->Classpath entry.




Sorting Enhancement
BIRT provides sorting on many report items, such as tables, group sections, and crosstabs. New for BIRT 2.5.2 is ability to set the collation strength and locale for the sorter.


Crosstab Cheat Sheet and Template
A new Report Template and Cheat Sheet are available for creating a cross tab style report.



Other enhancements are also in BIRT 2.5.2 and these can be viewed in bugzilla. The full list of bug fixes is also available with this query. You can download BIRT 2.5.2 here.

10 comments:

Unknown said...

Can you please tell me how can we add keypress event to a row in BIRT table, so that when a row is selected and the enter key is pressed it must load the details report. I am using BIRT 2.3.2

Jason Weathersby said...

Charu,

You can use the script tag in a text element. For example you could add a text element to the row set its type to html and enter a script similar to this:

<input type="text" name="myText" onKeyDown="rowKeyPressed()">

<script type="text/javascript" language="JavaScript">

function rowKeyPressed() {
alert("Row key " + event.keyCode);
alert( location.href );
}

</script>

You can search the location.href for the __report= value and swap with the detail report.

Jason

ap said...

Hallo,
Thanks for the information on this blog.

I am working Birt 2_5_2, i am new on it. I have a single class on a java poject to execute and save as html a designed report ( class executeReport taken from simple execute birt 2.1 example). It works fine. The problem is when i try to to export my project to jar and run it from command prompt, i get : "main class not found . Program will exit. "

Could you please help me ?
Thank you in advance,

ap said...

Hallo,
Thanks for the information on this blog.

I am working Birt 2_5_2, i am new on it. I have a single class on a java poject to execute and save as html a designed report ( class executeReport taken from simple execute birt 2.1 example). It works fine. The problem is when i try to to export my project to jar and run it from command prompt, i get : "main class not found . Program will exit. "

Could you please help me ?
Thank you in advance,

Anonymous said...

Do you have a method:

public static void main(String[] args){

}

Also do you have an entry in your manifest.mf (in the jar) which points to the main class?
Main-Class: MyPackage.MyClass

You can add the Main-Class in your ant build script in the jar task:

Anonymous said...

ant task to build jar with a main-class

ap said...

Hi Scott,

Thanks a lot. Problem is solved now.
Thanks for the support and thanks for the useful information provided through the blog.

Best Regards

Anonymous said...

I am kind of struggling with the below and this is an important requirement for our project. I almost have 8 reports with similar requirement.

I have a crosstab with date column (ex: mar-09, apr-09, ...) and rows with a name of a person. For each month, I display some number which could be anything (ex: amount of sales). I am able to define a sortcolumn and sort the columns based on the date.

But we have a requirement where the users can specify whether they would like to order the rows based on a person'name or total amount of sales and in ascending or descending order. I can pass two report parameters, sort by and sort order and sort the crosstab based on these two.

I would appreciate if anybody can provide an example (using DE API or crosstab events - onCreate, onRender, etc).

I posted this on BIRT forums almost a 10 days ago, but there was no response.

SLP said...

Hello,

Birt 2.5.2 :

In my report, I want to write number of pages per groups (in the footer of each group) like this :

Group 1 : Page 1/3, 2/3, 3/3
Group 2 : Page 1/4, 2/4, 3/4, 4/4

Could you please help me ?
Thank you in advance,

Jason Weathersby said...

Group footers are not repeated on every page. May be able to do this with page scripts and put the group page on the footer. Can you look at your report and see if you set the page break interval on your table?

Jason