Birt or Business Intelligence and Reporting tool is a tool that can build report without writing toooo many java codes. If you are using ireport you know what I’m talking about :) (crystal report.. no point :D)
Main draw back in Ireport is we have to write too many codes to build simple report that can integrate to java application. But in Birt no need to write codes just drag n drop.
Birt is a Eclipse Plugin (Only to Eclipse) that you can download. So in this article we demonstrate how to build some sample report with ease of drag n drop :)
Here we go…
- Download Eclipse (http://www.eclipse.org/)
- You can download eclipse for report users (Comes with Birt Plugin)
- If you already have eclipse just install the birt plugin
- Help –> Install New Software –> Click Add
- Give name as Birt and give location as http://download.eclipse.org/birt/update-site/3.7-interim/
- Click Ok
- Select All packages (tic) and accept the license agreement (whether we like it or not :P ).
- It will take some time to download all the packages and after the download restart the eclipse.
- Before make project adjust your perspective to Report Design
- To do that Window –> Show View –> Other
- Select Report tab and select all the fields
- Now its the time to create new project
- File –> New –> Other –> Business Intelligence and Reporting Tool –> Report Project
- Give a Name for the Project and click finish.
- Now the Project is created. But we have to create a report.
- To do that File –> New –> Other –> Business Intelligence and Reporting Tool –> Report
- Give a name for report and and click Next.
- In here you can choose the report template. (If you have one you can use it. but before you have to register the report template. will talk about this later)
- I choose Blank Report and click Finish.
- Now report is ok. But we need to display data.
- Click Palette in Left Hand side (this is the place that all controls have) and drag n drop Table component to report design.
- Give number of rows and columns and click Ok.
- Now you can see the table in report view (layout you are currently in)
- So the basic designing part is done. but data?? (give me 5 min)
- Click on the Data Explorer (right hand sof Palatte) –> right click and select new data source
- In here we can configure the database. For this demo we configure in built database that comes up with Birt. (Classic Model) (Others will talk later)
- Select Classic Models –> Next –> Finish.
- Right click data set –> new data set –> Next
- In the query window you can see the databases available.
- Select CLASSICMODELS expand it.
- In the query text area you can write the SQL query.
- In here we select customer name, customer first name and customer phone (You can do this by double clicking the table values in Available items)
- After click Ok you can see the window edit data set (if you have any query issue it will show some error window)
- Click Preview tab (in layout are) and you can see the output of data.
- Run –> View Report –> In web browser –> you can see the report in web browser.
- Can give more advance function like export to doc, pdf, ppt and many more.
Get ready to program in a whole new way!
Functional Programming in Java will help you quickly get on top of the new, essential Java 8 language features and the functional style that will change and improve your code. This short, targeted book will help you make the paradigm shift from the old imperative way to a less error-prone, more elegant, and concise coding style that’s also a breeze to parallelize. You’ll explore the syntax and semantics of lambda expressions, method and constructor references, and functional interfaces. You’ll design and write applications better using the new standards in Java 8 and the JDK.