How to customize BIRT Report Viewer look and feel

Enterprise software would want to maintain look and feel of all the screens in the application. This not only adds aesthetics but may also simplify usability if designed correctly. This is all the more important if a screen has a bunch of functionality that integrates with the rest of the product.

Birt is highly extensible and just like any mature product, provides ability to customize various aspects of a report. Birt comes with a plain and simple report viewer out of the box. However, there are ways to customize this page. While one can go too far depths in customizing this page, basic requirements like matching UI template is very simple to implement in Birt.

you can customize the UI of report viewer from FramesetFragment.jsp file. On a development box with just xampp installed at default location, this file can be found at:

C:\xampp\tomcat\webapps\birt\webcontent\birt\pages\layout\FramesetFragment.jsp

In addition, you can also customize the Style.css file located at birt\styles\style.css to match your template.

For example, if you want to add your custom logo to the page or you want to add the border to your report, you will make following change to the file:

FramesetFragment

FramesetFragment

Beginner’s Guide for BIRT and PHP

Install Tomcat

  1. Download XAMPP from here: https://www.apachefriends.org/download.html
  2. Start XAMPP and go to XAMPP Control Panel. XAMPP Control Panel
  3. Start Tomcat service.
  4. Test Tomcat: http://localhost:8080/ If you get a webpage, then you have tomcat ready for Birt

Install BIRT Design Tool

Birt Designer is a visual report development tool with task-specific editors, builders and wizards that enable you to create data visualizations that can be integrated into web applications.

  1. Download the BIRT Report Design Tool, from here:
    http://download.eclipse.org/birt/downloads/BIRT Report Design Tool

Install BIRT Report Viewer

The BIRT Runtime contains three different packages: The Report Engine, the exploded Sample Viewer WAR, and the Sample Viewer WAR. Your choice of package will depend on your deployment scenario. You can find more details here: http://www.eclipse.org/birt/documentation/integrating/viewer-setup.php

  1. Download the BIRT Report Viewer: http://download.eclipse.org/birt/downloads/#runtimeBIRT Report Viewer
  2. Deploy the BIRT Viewer application. Follow these steps:
    1. Download the zip file with the BIRT report engine runtime. The file is named birt-runtime-version#.zip
    2. Unzip the file in a staging area
    3. Look under the birt-runtime- directory and locate the “Web Viewer Example” director.
      Copy the “Web Viewer” Example directory to the <XAMPP ROOT>\tomcat\webapps directory of your Tomcat installation. For ease of reference, rename the directory “Web Viewer” to “birt-viewer“.
    4. Restart Tomcat.
    5. Review the Tomcat manager application to check that the viewer is deployed:
      http://localhost:8080/manager/html
      Tomcat web application manager
    6. Verify that birt-viewer is listed as an application, then click on the birt-viewer
    7. A page confirming that the BIRT viewer has been installed should be displayed. Click on the link labeled “View Example” to confirm that your installation is working properly.
  3. A note about client configuration: The BIRT Viewer requires that cookies be enabled on your browser. Follow steps below on Firefox to enable cookies:
    1. click the menu buttonmenu-icon and choose Options.Preferences.
    2. Go to Privacy Panel
    3. Set Firefox will: to Use custom settings for history.
    4. Check mark Accept cookies from sites to enable cookies, and uncheck to disable.

Note: Cookies are enabled by default in Firefox

Install JDBC Drivers

  1. You may download drivers from mysql site here:
    https://dev.mysql.com/downloads/connector/j/
  2. Add the jar files for your JDBC drivers to the Viewer. Copy the driver from the following directory:
    Path for Windows Jar File: <XAMPP-ROOT>\tomcat\webapps\birt-viewer\WEB-INF\lib
    Jar file path
  3. BIRT JDBC Driver Location NoteIf you are installing BIRT 2 series the driver needs to be copied to birt-viwer\ReportEngine\plugins\org.eclipse.birt.report.data.oda.jdbc_yourVersion\drivers If you are installing BIRT 3.7 or higher, the jdbc driver should be placed in the WebViewer’s classpath (eg WEB-INF/lib).
  4. If you choose to put the Viewer into some other location, you’ll need to use a context entry within the server.xml file to indicate the deployment location. See Tomcat documentation for details.

Verify BIRT Installation

  1. Check if BIRT is integrated with Tomcat or not. You can check using the following steps
      1. Open tomcat and create the User (i.e) go on the Manager App.
        Apache Tomcat
      2. Click on “Manager App” you will get a window prompt for login. If you got a username and password proceed with the login or create username and password, go to next step.
        Manager App Login
      3. Open XAMPP control panel, go to
        Tomcat->Config->tomcat-user.xml.
        XAMPP Panel
      4. It will open the tomcat-user.xml file, where you can create username and password for admin & manager.
        tomcat-user.xml file
      5. After creating the username and password for both the users, try login with Manager App credentials.
        Manager App Login
      6. Successful Login. You will come across the tomcat web application manager window. Follow the next step go to BIRT.
        Tomcat Web Application Manager
      7. After you click on BIRT, you will get a message BIRT viewer has been installed. Here’s where you are confirmed BIRT is successfully integrated with Tomcat.
        BIRT Viewer
      8. Check for the Example (i.e) displaying a report. Below is the sample view of a report.
        BIRT Viewer Displaying Report

Finish

Here’s you BIRT is ready to integrated and ready to use with any project. You can display multiple reports with BIRT, as it is user-friendly and comes with easy deployment process. It Supports different type of charts which can make your reports more appealing, attractive and more presentable.