IBM Cúram Birt Report – Bar Chart Development Example


Introduction


A bar chart is a graph with rectangular bars. Each bar’s length or height is proportional to the bars’ represented values. In other words, the length or height of the bar is equal to the quantity within that category. The graph usually shows a comparison between different categories. Although the graphs can technically be plotted vertically or horizontally, the most usual presentation for a bar graph is vertical. The x-axis represents the categories; The y-axis represents a value for those categories. In the graph below, the values are percentages. We can use bar chart to compare between various cars, please find the Bar Chart below –


Bar Chart Development Using Birt


As I already explained in my previous tutorial that Birt is very important and providing various functionalities to reduce the developer’s effort to develop any kind of Reports. Birt is providing great support to develop Bar Chart as well. Here, in this tutorial, we will explain about Bar Chart development using IBM Curam Report project. Please follow step by step instruction below –

Note: The IBM Curam Birt Report Project should be up and running in your local system. Please follow instruction to setup project using below URL:

IBM Cúram Birt Report – Project Configuration

 


This section of the tutorial will help the developer to develop sample Bar Chart Birt Report.
Please follow step by step instruction to develop the Birt Report in below section.

 


Prerequisite: IBM Cúram Birt Project already configured and working. There would not be any issue.


Change the Project Perspective to Report Design.


Explore to Curam BI Content Project to create a New Report, The developer has to make sure that eclipse perspective is Report Design otherwise option would not visible to the developer.

Right Click on birt folder -> New – > Report to create a new report.


Once clicked on Report option from the previous steps then New Report Creation model window display. Enter the Report Name and click on Next button.

 


Once clicked on Next button from the previous screen then it navigates to the next screen where the developer can select the report templates. The eclipse Birt has many pre-defined templates which can be used. Pre-defined template will helps to reduce total development time & efforts. We are using Chart & Listing Report Template to learn few more option to develop reports.

Select Chart & Listing


Once Clicked on Finish button then it navigates to Chart & Listing Report.

We will work on Design Chart and Listing Report after Data Source and Data Set Configuration completed.


Data Source Configuration


Data Source configuration is very important as the developer has to configure database connection related information like Driver Class, Database URL, Host Name, Port Number, User Name, Password & JNDI URL.
The developer can set Data Source by Right click on Data Source folder in the left-hand side window.


By Clicking on New Data Source option then it navigates to New Data Source Creation screen. Select below option and click on Next button.

  • Select Radio button – “Create from a data source type in the following list”.
  • JDBC Data Source


Once clicked on Next button then it navigates to Database configuration window. The developer has to provide reporting database configuration. Please find the screenshot for more information about configuration. The developer can test the database connection using the Test Connection… button and complete the configuration by clicking on Finish button.

 

Test the database configuration, click on Test Connection… button.


Once developer clicked on Finish button then model window will disappear and database configuration will be completed.


Data Sets Configuration


Data Sets is another important configuration while developing birt report using eclipse and we can go further without this. The developer has to set SQL Query which helps to pull the records from the database which we configured in the previous step.
This sample report has very simple SQL Query but in the real project, the developer used to develop and configure SQL Query with 1000+ line or more which is not easy to run and manage by a Non-Technical Person like management.
Right Click on Data Sets option from the left-hand side of the report and Click on New Data Sets option.
Please follow steps to configure SQL Query in Data Sets window.


Once the developer clicked on New Data Sets option from the previous screen then it navigates to the new Data Sets Creation model window. Enter the Data Sets Name which will be used in the report and select appropriate option as per screenshot and Click on Next button.


By clicking on Next button then it navigates to window where the developer can see the Data Source and enter the SQL Query which they want to configure to pull the data. Click on Finish button to complete the configuration.


Once Clicked on the Finish button then it completes the Data Sets configuration and navigates to the Report page.

OUTCOME OF THE SQL QUERY (COLUMN):

APPLICATION_SOURCE

APPLICATION_TOTAL

TOTAL_APPLICATION


The Chart Report Design


Here, in this section of tutorials, we will explain to design Bar Chart Birt Report and important functions.
In the beginning of the tutorial, we selected Chart & Listing Report Template to create our sample report. As the selection of template provide basic layout and design of the report and developer has to configure DataSet and some design layout like Header, Footer, Label, Image etc to develop the report.

 


Double Clicked on Report Header to enter the header for the Sample Report. we inserted as “KW Bar Chart Report.


Double Clicked on Chart Area (Row) to set the chart Properties. Once clicked on Row then Bar chart will appear.


Once Clicked on Bar chart then it navigates to Edit Chart Model Window. This screen is very important and providing functionality to set the chart property and DataSet configuration.


Edit Chart Screen is having three section like “Select Chart Type“, “Select Data” & “Format Chart“. Please find the explanation below –

 

  • Select Chart Type: The Developer can set the correct type of chart using this screen. Support developer wants to develop report related to Bar Chart then select Bar chart option from “Select Chart Type” Field and click on Next button to move to other section of the screen.

There are various type of chart type available to select like Bar, Line, Area, Pie, Meter, Scatter, Stock etc.

 

  • Select Data: Once click on Next button then it navigates to Select Data section of the screen and the Developer has to set Data which they want to display on the report.


The developer has to configure all required Fields like Slice Size Definition, Category Definition and select Use Data From radio button which store DataSet which we created in our previous step. Once selected correct DataSet and clicked on Show data preview button then sample data will be available.


Once clicked on Next button then it navigates to Format Chart Section where we will configure the chart name, category etc.

This section is having mainly two Fields to set:

  • Chart Area: The Chart Area again having Fields like Title to set the title of the chart, Plot & Legend.
  • Series: The Developer has to configure chart series information as we set Application Source.


Once Clicked on Finish button then Sample Bar Chart Report is ready to test. The developer can explore many other options to make this report attractive and configure more information. We are just providing sample report.

 


Save the Report and the developer can run the report to verify the data through eclipse.

Click on Run -> View Report ->In Web Viewer


Output


 


Hope, Reader understand all the steps mentioned in this tutorial to develop Bar Chart Birt Report. Please provide your feedback to improve the tutorial.


 

One thought on “IBM Cúram Birt Report – Bar Chart Development Example”

  1. Hi DHARMEDRA SAHU,

    I need a trainer on Curum for Online. If you are interested please feel free to reach us below number.

    Regards
    Vivek
    +91 9177351577

Leave a Reply

Your email address will not be published. Required fields are marked *