BIRT Framework
January 6th, 2009
Introduction
Abstract:
This presentation is created to introduce BIRT framework and
architecture. It is broken into four units introducing BIRT
component, BIRT designer installation, basics, data
sources, data binding, deployment options and examples.
Objectives:
1. Identifying BIRT components
2. Understanding BIRT architecture and its basics
3. Learning how to install BIRT designer
4. Understanding Render and Run Tasks and how BIRT
connects to a data source
5. Introducing ROM specifications and Scripting in BIRT
6. Identifying events sequence and deployment options
Unit 1 Overview
BIRT components
Installing and Configuring BIRT
Learning Basics
Creating a listing report using BIRT templates
Creating a listing report using Maximo templates
BIRT Report Designer Maximo extension
continued
Definition:
– Eclipse 3.2.2 Platform
– BIRT SDK: Business Intelligence and Reporting Tools
Software development Kit
– Graphics Editor Framework: GEF is an Eclipse plug-in
used in the BIRT Report Designer’s user interface
– Eclipse Modeling Framework: EMF is a collection of
Eclipse plug-ins that BIRT charts use. EMF download
includes the required Service Data Objects (SDO)
component.
– iText is a library that BIRT uses to generate PDF files
(Optional).
Unit 2 Overview
Connecting to a Data Source
Retrieving Data
Binding Data
Retrieving Data
Creating a new report showing workorder linked to
locations and equipments:
– Task 1: Create a new Tivoli Listing report
– Task 2: Define your sql statement
– Task 3: Create data sets
• One data set using SQL Join
• Multiple data sets (Sub reports will be covered later)
– Task 4: Design the Layout
– Task 5: Preview the report
Retrieving Data
Create a new Tivoli Listing Report
– Click on new Report and choose Tivoli Listing Report from the list of available
templates
– Give your report a name
– Finish
Define the sql statement:
– Select workorder.wonum,workorder.location,locations.description from workorder
left outer join locations on locations.siteid=workorder.siteid and
workorder.location=locations.location
– Create Dataset and paste the sql query using joins
– Define output columns
Fetch output columns in the fetch method
• row["wonum"] = maximoDataSet.getString("wonum");
• row["description"] = maximoDataSet.getString("description");
• row["location"] = maximoDataSet.getString("location");
Drag and drop dataset elements in the layout
Preview the report with a whereclause
Binding Columns
Before you can use dataset
columns, there must be a
data binding
Dragging and dropping
columns into the layout
creates the automatic
binding for you. This is
called column binding
Column bindings can be
found under the table in the
tree structure. It shows the
dataset, list of columns and
their expressions
Binding Columns
Add new computed field and create a new column binding
for it:
– Drag and drop data item from the palette
– Define a new binding name
– Add expression
– Save
You should use the expression builder because it inserts the
correct syntax:
– When columns are taken from the dataset, it shows as
dataSetRow[“field”]
– When columns are referring to other column binding, then it
uses row[“column_binding”]
Unit 3 Overview
BIRT Architecture
Report Object Model (ROM) Specifications
Scripting in BIRT
BIRT Architecture
About Report Designer and BIRT RCP Designer:
– Graphical Report Design Tool which generates a report design based
on the ROM (Report Object Model) which can be customized
– BIRT RCP has functional differences with the BIRT Designer:
• No integrated debugger in RCP
• No Java Event Handlers in RCP
About Report Viewer:
– Can be deployed on most J2EE application servers ( including
websphere and weblogic)
– Allows passing parameters, specifying report format and locale
– Directory location of reports can be configured. When reports are
uploaded, they are written to that directory
– Available as Eclipse plugin (works with Eclipse Tomcat in the
Designer). The advantage is that no need to configure extra J2EE
files
ROM Specifications
Defines a set of xml elements describing the
visual (report items) and non visual components
(data sets, data sources, report params and
styles) of a report
Rptdesign file consists of ROM elements
describing:
– Datasource and queries
– Placement, size and structure of report items
– Report page layout
Report design engine uses the ROM specification
(xsd schema) to validate the report design content
Scripting in BIRT
BIRT generation phases:
– Preparation:
• RunTask (produces the rptdocument) and “RunAndRender
(produces the final output) Task” prepare the report item for
execution
– Generation:
• RunTask and “RunAndRender Task” create an instance of
each report item, connect to the datasource, execute the
data set and process the data to produce the report
– Presenation:
• RenderTask (Preview a report in Designer) and
“RunAndRender Task” select the correct emitters to
produce the final output.
Unit 4 Overview
Events Sequence
Deployment options
Overview
XML Report
Report Data Document
Design
Data
Deployment options
Paginated HTML, PDF, TOC, Bookmarks, CSV
RptDesign
XML RptDocument
Design File Report
Document
Questions?