Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BIRT is an Eclipse-based open source reporting system for web applications, especially those based on
Java and J2EE. BIRT has two main components: a report designer based on Eclipse, and a runtime
component that you can add to your app server. BIRT also offers a charting engine that lets you add
charts to your own application.
A BIRT report is a structured document that displays data from an external information system, such as
a database or application. Data in the report is organized and formatted so that it is meaningful and
useful to the person who reads the report. A BIRT report is not a document that you type, like an essay
or research paper, although you could use BIRT Report designer to create such document.
Using BIRT Report designer, you can create real-time information and operational reports, such as a bill
of materials or an invoice, number of times an employee was present in an organization. Any time you
need to gather, analyze, summarize and present data from an information system, a report is the
solution.
THE PROCESS OF MAKING A REPORT
Designing a report involves the following tasks. You do not have to perform all the tasks in order in
which they are stated, but if new to BIRT Report Design, The following should be the starting point.
You can create one project to organize all your reports or create multiple projects to organize your
reports by categories. For each project that you create, Eclipse creates a directory in your file system:
Before you begin designing your report in the layout editor, you build a BIRT data source to
connect your report to a database. When you build a data source, you specify the driver class, data
source name, and other connection information that is specific to the data scource (username,
password…)
1. Chose a data Explorer (left of the layout editor next to the palette)
2. Right click the data sources, and then choose New Data Source from the context menu. New
Data Source displays the types of data sources you can create.
3. Select data source, driver class, data source name, username and password.
4. Choose Finish.
A Data set identifies the data to retrieve from the data source. If your report connects to a jdbc data
source, you use a SQL SELECT statement to identify the data to retrieve.
1. In data explorer, right click Data Sets and choose New Data Set from the context menu.
2. On the data set, in the data set Name, type the name you wish to name it and choose next.
3. Create your SQL query e.g. {Select * from student}
4. Choose finish to save your data set.
5. Choose Preview results to make sure the query is valid it returns the correct data.
In this procedure, you insert elements in the report page to display the data from the data set you
created previously. You start by inserting a table element in the table. The table iterate through all
the data rows that a data set returns and it enables you lay out data easily in a row and column
format.
When you have verified that the report displays the correct data in the correct order, you can turn
your attention to improve the report’s appearance.
Label ---Use to include static (or localized) text within a report. Typically for report titles, column
headers or any other report text.
Text--Use to include richly formatted text to your report, including the ability to integrate HTML
formatting with your dynamic data.
Dynamic Text--Use to integrate your static text with dynamic or conditional data.
Grid--Use to define the layout of a report. It can be nested within other grids to support complex
layouts.
List--Use to display Data elements from your data source that repeat and creates a new report row
for each data set row. It can contain multiple levels of grouping.
Table--Use to display repeating data elements within your report and has support for multiple
columns and multiple levels of grouping.
Cross tab--Use to display grouped and dynamic data by both the row and column level.
Aggregation--Use to build totals for tables and groups. It also includes over 30 built-in functions
like COUNT, SUM, MAX, MIN, AVE, RUNNINGSUM, COUNTDISTINCT, and RANK.
TIPS IN REPORTING
Always PLAN your report. Sketch it down on a paper. Planning saves time in the long run
because you do not waste time creating a polished report that contains the wrong
information or layout.
Always rename you dataset and avoid using default names (dataset1, dataset2…) so you can
always keep track of the report you wish to add to the layout with ease.
Make sure you always choose “Preview Result” when creating a dataset before choosing
“OK” to make sure your SQL syntax is correct.
Do not preview your report in the eclipse platform only. There are other ways to preview
your report; html, web viewer, PDF. The layout might be different.
Building a report without checking if the data source is correct. If the data Source is wrong,
then do not expect to see a report. Always test connection when creating your data Source.
Inability to see you data explorer or palette for creating a report: Make sure you are always
in BIRT perspective.
Leaving the report unformatted: There is nothing like enhancing the appearance of your
report; easier to understand and pleasing to the eye.
REFRENCE:
BIRT Tutorial:
http://www.eclipse.org/birt/phoenix/tutorial/basic/basic10.php#about#about