- Introduction
- Reporting interface after project completion
- The installation requires
- Create BIRT Project
- Create Data Source
- Create dataset
- Create new Report
- Configuring the size of the report
- Interface Design (Header)
- Design charts
- Run reports for the first time
- Designing the body of the report
- Run report (2)
- Edit style (1)
- Run report (3)
- Sub Total
- Run Report
BIRT reporting Programming Tutorial for beginners
2. Reporting interface after project completion
No ADS
This is a photo of report will be made in this document:
Raw data:
First of all, we need to understand some professional knowledge:
- A CUSTOMER can create one or more ACCOUNT in a branch of some bank.
- Each account corresponds with a service PRODUCT provided by the bank.
- Each account has an AVAILABLE BALANCE.
** SQL **
Select Acc.Account_Id
,Acc.Cust_Id
,Cus.Address Cust_Address
,Acc.Product_Cd -- Product Code (Service of Bank)
,Acc.Open_Branch_Id -- Branch (of Bank)
,Bra.Name Branch_Name
,Acc.Avail_Balance -- Available Balance
From Account Acc
,Customer Cus
,Branch Bra
Where Acc.Cust_Id = Cus.Cust_Id
And Acc.Open_Branch_Id = Bra.Branch_Id;
3. The installation requires
BIRT Plugin:
For programming BIRT report, you need to install BIRT tools into Eclipse. You can see the instructions at:
Sample database:
LearningSQL is a small database used commonly in the instruction of o7planning. The instruction of programming BIRT report also uses data on this Database. You need to create this Database (It takes only 5 minutes) as the following instruction:
JDBC Driver library for Databases (Oracle, MySQL, SQLServer) and its use:
Depending on the type of Database, you use the equivalent JDBC Driver library of that Database (It takes you 3 minutes to finish it), look at the instruction of download at:
5. Create Data Source
No ADS
Create a Data Source from JDBC, or XML,... In this document, we will create Data Source from JDBC connected with LearningSQL database.
Here I connect JDBC with LearningSQL database (on DB Oracle). However, other Database manipulation is carried out alike.
ojdbc6.jar is a JDBC Driver library for Oracle
Check whether database LearningSQL has been connected or not.
6. Create dataset
No ADS
Enter:
- Data Set Name: Account avail balance
Select Acc.Open_Branch_Id
,Bra.Name Branch_Name
,Acc.Cust_Id
,Cus.Address Cust_Address
,Acc.Account_Id
,Acc.Product_Cd
,Acc.Avail_Balance
From Account Acc
,Customer Cus
,Branch Bra
Where Acc.Cust_Id = Cus.Cust_Id
And Acc.Open_Branch_Id = Bra.Branch_Id
Order By Acc.Open_Branch_Id
8. Configuring the size of the report
No ADS
We create a default report whose size is the same as that of an A4 paper.
Select property:
- Orientation: Landscape
Configuring Border:
You can also change other properties.
12. Designing the body of the report
No ADS
Raw data like the illustration below:
But we will design the report so that its display is more simple and eye-catching (As the below illustration)
We will carry out step by step.
Drag and drop Table icon into the screen of report.
No ADS