Friday, March 04, 2011

BIRT 2.6.2 Enhancements

BIRT 2.6.2 is now available and is a maintenance release with a primary concern on bug fixes. This generally means not many new features are introduced. That said a couple of bug fixes merit special attention. The full list of available fixes can be found here.


BIRT Pagination and Page Scripts


BIRT 2.5 introduced page variables and page scripts. These features added the ability to repaginate based on things like a group change. So in one report output you could add a page variable that showed the page count and current group page number within a group. The full details for this feature are available in the BIRT 2.5 new and notable.

While using this feature is very nice, a particular bug caused the scripts not to fire when using a page break interval of 0. The page break interval is one of the many ways in BIRT to introduce a page break in the output. It essentially informs the engine to process a certain number of rows and then insert a page break. If the interval for a table is set to 0, the engine inserts page breaks when all the master page available real-estate is used. In BIRT 2.6.2 this bug is now fixed, allowing the designer to enter a page break interval of 0 in conjunction with page scripts.



The above example can be downloaded from BIRT-Exchange.

To see some of the pagination bugs that were addressed in 2.6.2 see this bugzilla query.


URL security bug



A security issue with the example Web Viewer was identified which posed a cross-site scripting vulnerability. The issue has to do with the __report URL parameter. This parameter specifies the report for the viewer to run. In previous versions of BIRT a fully qualified URL could be used to specify the report, which allowed the report to reside on a completely different server. Since BIRT reports can contain JavaScript which runs server side this poses a scripting risk. The full details for the bug are located here.

BIRT 2.6.2 fixes this issue by adding a web.xml entry that allows the developer to control what value can be used in the __report URL parameter. The entry is named URL_REPORT_PATH_POLICY and has three valid values (all, domain, and none). If the all value is specified no checks on the URL parameter are performed. This value should only be used when access to the viewer is restricted to a known user base. When the none option is used, only local reports to the viewer context for the server are allowed. When the domain option is used the report can contain a fully qualified URL as long as the domain for the server is the same.



If you cannot upgrade the viewer, the patch details are available in the bugzilla entry.


Formatter object


BIRT 2.6.2 now offers a formatter object in the expression builder to format dates, strings and numbers within a given expression. This function is detailed in the following post.




Radar Chart


The Radar Chart in BIRT was implemented in BIRT 2.6 to function as an example on how to implement your own chart types. The source for this chart type is available in two of the BIRT plug-ins (org.eclipse.birt.chart.examples and org.eclipse.birt.chart.examples.core). In BIRT 2.6.2 this chart type has been improved and it now supports rendering multiple series on the same radial within a radar chart.



The GUI for building the radar chart has also been improved to support a more optimal layout for configuring portions of the chart.

4 comments:

Jason Weathersby said...

Can you try to get the helios download located here:
http://www.eclipse.org/downloads/packages/eclipse-ide-java-and-report-developers/heliossr2

Jason

Jason Weathersby said...

page variables and scripts only work when the output is generated with two processes. A run task and then a Render task. In the designer when you produce straight to pdf it uses on one process (runandrendertask). You can run it the WebViewer and then export to pdf and it should be fine.

Vijay said...

i have more than 60 K records in in my database , i wanted to display these in one page .

I am using birt-viewer and List object to display the record detail.

i found the option in BIRT “Page Break interval” which is default set to 40 (lines)
I can make this value greater than and less than 40 , but only lesser value works. Which means if I give 25 it displays 25 records per page ,whereas if I give 100 it only displays 40 records per page.


Please advise.

Jason Weathersby said...

Use auto layout instead of fixed (Report property), and set page interval to 0. You can also set the master page height to whatever you want. Finally you can also use /run instead of /framest and it will put it in one html page.