Wednesday, May 6, 2009

Flex BIRT Report Viewer

Just though I should share this before I back it up on my harddisk (since I am not using BIRT anymore).

This is a simple BIRT report viewer (basically hides BIRT under your customized view).

It uses the famous IFrame code to show a simple web page (retrieved from the BIRT runtime) under a flex application.

It also determines where you are viewing the report (on my pc or on the server) and points to the appropriate location.

Here is a screen shot for you enjoyment. While it runs:

After completion:

All you need to do is change the following in the code :
ReportViewerUrl = "http://localhost:8400/ReportXViewer/"
to point to your server.
Then after deployment you can simply call appending ?__report=yourreport.rptdesign as you normally would with the servlet based report viewer.

Of course you should change the logo to your own ;)