Anda di halaman 1dari 56

IBM Tivoli software

BIRT Framework
January 6th, 2009

By: Amer Seifeddine

Understanding BIRT Framework

Support Technical Exchange Web site


http://www-
© 2008 IBM Corporation
306.ibm.com/software/sysmgmt/products/
BIRT

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

© 2008 IBM Corporation - Confidential


BIRT

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

© 2008 IBM Corporation - Confidential


BIRT

BIRT Components - Introduction


 BIRT is a powerful reporting platform that provides end-to-end reporting solutions, from creating and
deploying reports to integrating report capabilities into other enterprise applications
– Customize the report-generation process
– Incorporate complex business logic in their reports
– Deploy reports
– Integrate reporting capabilities into other applications
– Extend BIRT functionality
 BIRT Platform is interoperable and extensible:
– the ability to dynamically build or modify reports from within an application using the design engine
application programming interface (API) and the ability to access native data objects using the scripted data
source mechanism
– In the area of extensibility, BIRT provides hooks to build upon platform capabilities in the following areas:
• Report Item: New controls may be added to the BIRT designer palette using the report item extension API.
• Complex Logic: Event handlers written in JavaScript or Java may be included in the generation or presentation
phase of report or chart execution to incorporate custom logic required by the application.
• Data Access: The Open Data Access (ODA) extension provides the means to develop drivers for new, non-JDBC
data sources as well as create graphical user interfaces for query specification.
• Rendering: New report output formats or output for specialized devices can be developed using the report
rendering extension API

© 2008 IBM Corporation - Confidential


BIRT

BIRT Components - BIRT Install Types


 BIRT can be installed in the form of:
– BIRT RCP (Rich client platform) Report Designer is a stand-
alone component that only requires a Java JDK.
• Simplified Report Designer for those who has no programming
experience.
– BIRT Report Designer:
• All in one Or
• Independently download and install all the components that are required to
run BIRT Report Designer
– Eclipse 3.2.
– Graphics Editor Framework (GEF) 3.2.
– Eclipse Modeling Framework (EMF) 2.2.
– install itext-1.3.jar only after installing BIRT
– JDK 1.5

– BIRT Report Designer and SDK: same as BIRT Report Designer


except that it has the source code of the plug-ins

© 2008 IBM Corporation - Confidential


BIRT

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).

© 2008 IBM Corporation - Confidential


BIRT

Installing and Configuring BIRT - Prerequisites


 Gather documents for installation:
– Java 1.5: http://java.sun.com/products/ or
http://w3.hursley.ibm.com/java/jim/jim/index.html
– Eclipse Full SDK eclipse-SDK-3.2.2-win32.zip
– Business Intelligence and Reporting Tools SDK birt-report-
framework-sdk-2.1.2.zip
– EMF (Core) SDK emf-sdo-SDK-2.2.2.zip
– GEF SDK GEF-SDK-3.2.2.zip
– Above links can be found on:
• http://ies.ottawa.ibm.com/iss/ies/downloads/buildpage.php?build=
R-3.2.2-200702161001&os=win32,win32,x86
 Optional:
– <maximo>applications\maximo\maximouiweb\webmodule\WEB-
INF\birt\platform\plugins\com.lowagie.itext_1.5.2.jar
– Eclipse Language packages

© 2008 IBM Corporation - Confidential


BIRT

Installing and Configuring BIRT - Setup


 Copy and extract files:
– You may not download the content directly from the Eclipse.org website, use IES instead
and make sure you have below files:
• Eclipse SDK 3.2.2
• GEF SDK 3.2.2
• EMF (Core) SDK 2.2.2
• Business Intelligence Reporting Tools SDK 2.1.2
• JDK 1.5
– Extract the Eclipse SDK 3.2.2 compressed ZIP file to a local folder such as c:\eclipse
– Extract the GEF SDK 3.2.2 compressed ZIP file to the same local folder
– Extract the EMF (Core) SDK 2.2.2 compressed ZIP file to the same local folder
– Extract the BIRT SDK 2.1.2 compressed ZIP file to the same local folder
 Except for the Eclipse SDK 3.2.2 compressed ZIP file, which must be extracted first,
it does not matter which order the three remaining files are extracted
 Optional: Copy the com.lowagie.itext_1.5.2.jar file from
<maximo>applications\maximo\maximouiweb\webmodule\WEB-
INF\birt\platform\plugins to c:\eclipse\eclipse\plugins
 Tune JVM Parameters on the Eclipse shortcut: -vm
D:\Programs\Java5\jdk\bin\javaw.exe -vmargs -Xmx512m

© 2008 IBM Corporation - Confidential


BIRT

Installing and Configuring BIRT - Configuration


 Configure:
– Navigate to eclipse\plugins\org.eclipse.birt.report.viewer_2.1.2.v20070205-1728\birt\WEB-
INF:
• Create a classes folder
• Copy the entire \com folder and mxreportdatasources.properties file from
<maximo>\reports\birt\scriptlibrary\classes to
eclipse\plugins\org.eclipse.birt.report.viewer_2.1.2.v20070205-1728\birt\WEB-INF\classes folder
– Modify mxdatasources.properties under eclipse to reflect the connection to your MAXIMO
database
– Add Java args to the Eclipse exe shortcut: C:\eclipse_download\BIRT\eclipse\eclipse.exe -
vm "C:\program files\IBM\Java50\bin\javaw.exe" -vmargs -Xmx512m
– Create a workspace
– Go to File – New – Project. Scroll down to the Business Intelligence and Reporting Tools
Location, and select Report Project. Click Next. Then Type in a project name and click Finish
– Specify the resource folder location to import the V7 Libraries using Window – Preferences,
expand Report Design and select Resource and browse to your local report library location
and select Apply
– Specify the templates folder location to import the V7 Templates using , Window –
Preferences, expand Report Design and select Templates and browse to your local report
template location and select Apply
– Disable the Comment Template using Window – Preferences, and remove the flag from the
‘Generate comment ...“
– Import the project using File->Import existing project into workspace and select the your
“reports” folder

© 2008 IBM Corporation - Confidential


BIRT

Installing and Configuring BIRT - Additional languages


 All BIRT user interface components and messages are
internationalized through the use of properties files. BIRT uses
English as the default language, but other languages are
supported by installing a language pack that contains the
necessary properties files. There are 24 BIRT language packs,
four each for the following six BIRT products:
– BIRT Report Designer Full Eclipse Install
– BIRT Report Designer
– BIRT RCP Report Designer
– BIRT Report Engine
– BIRT Chart Engine
– BIRT Framework SDK

© 2008 IBM Corporation - Confidential


BIRT

Installing and Configuring BIRT - Languages


 Each of the four language packs contains support for a specific
set of languages. The names of the language packs are identical
for each product, although the archive file names differ. The
following list describes the four language packsand the
languages that they support:
– NLpack1:The NLpack1 language pack supports German,
Spanish, French, Italian, Japanese, Korean, Brazilian
Portuguese, traditional Chinese, and simplified Chinese.
– NLpack2: The NLpack2 language pack supports Czech,
Hungarian, Polish, and Russian.
– NLpack2a: The NLpack2a language pack supports
Danish, Dutch, Finnish, Greek, Norwegian, Portuguese,
Swedish, and Turkish.
– NLpackBidi: The NLpackBidi language pack supports
Arabic and Hebrew. Hebrew is only for Eclipse runtime,
GEF runtime, and EMF runtime.

© 2008 IBM Corporation - Confidential


BIRT

Installing and Configuring BIRT - Languages:


 How to download and install a language pack
– Choose the language pack from the IES site:
http://ies.ottawa.ibm.com/iss/ies/downloads/buildpage.php?build=R-3.2.2-
200702161001&os=win32,win32,x86
– Download the language pack for the product and language that meets your needs.
– Extract the language pack archive file into the directory above the Eclipse directory.
– Start Eclipse and choose Window➛Preferences➛Report Design➛Preview.
– Select the language of choice from the drop-down list in Choose your locale.
– Restart Eclipse.
 If Windows is not running under the locale you need for BIRT, start Eclipse using
the -nl <locale> command line option, where <locale> is a standard Java locale
code, such as es_ES for Spanish as spoken in Spain. Sun Microsystems provides
a list of locale codes at the following URL:
http://java.sun.com/j2se/1.5.0/docs/guide/intl/locale.doc.html Eclipse remembers
the locale you specify on the command line. On subsequent launches of Eclipse,
the locale is set to the most recent locale setting. To revert to a previous locale,
launch Eclipse using the -nl command line option for the locale to which you want
to revert.

© 2008 IBM Corporation - Confidential


BIRT

Basics – Process definition


 Report Design Process:
– Plan the report
– Start a new report design
– Specify the data to use
– Layout and format the report
– Design Mater Page (use existing Maximo Master
created in the template)
– Preview and test the report

© 2008 IBM Corporation - Confidential


BIRT

Basics – Understanding the report Design Tools


 Navigator:
– Imported using “import
Existing Projects into
Workspace” or created using
“new Report Project”
– Allows to browse all
“reportdesign” files at the
same time
– Contains folders representing
Maximo applications but not
necessarily containing
rptdesign files like “Acitivity”
but must contain “report.xml”
file.
 Data Explorer: shows data
sources, data sets, report
parameters

© 2008 IBM Corporation - Confidential


BIRT

Basics - Understanding the report Design Tools


 Outline:
– Shows the structure of the
report as tree view
– Shows the datasource, report
parametes, body, master
pages, imported themes and
libraries.
 Palette: Shows all elements
which can be used to organize
the report and display data.
 Property Editor: displays the
properties of the report
elements currently selected in
the layout editor.

© 2008 IBM Corporation - Confidential


BIRT

Basics – Report Design Files


 BIRT Report Designer uses a
simple document model. It
creates just one file with the
.rptdesign.
 Unlike Actuate which has a
special .bas file (Actuate
foundation classes), BIRT uses
simple xml files!
 BIRT Report Designer displays
the graphical view of the report
design xml file.
 BIRT Report Designer writes
all properties as xml elements
 Reports.xml file is used by
Maximo to import reports and
not BIRT

© 2008 IBM Corporation - Confidential


BIRT

Basics – Report output formats


 You can save and view a report in the following
formats:
– HTML
– Microsoft Excel (CSV)
– PDF
– Microsoft word document (not supported in Maximo)
– Microsoft power point (not supported in Maximo)

© 2008 IBM Corporation - Confidential


BIRT

Creating a listing report using BIRT templates


 Create new folder called
Training (Right-click, new
folder)
 In this folder, create a new
report and select the “simple
listing” BIRT template (Right-
click, new Report)
 Create a new Data Source:
– Manage Drivers and add new
db2 JDBC driver
– Add Driver class, driver URL,
username and password

© 2008 IBM Corporation - Confidential


BIRT

Creating a listing report using BIRT templates


 Add a new dataset:
– Right-click datasets and add
a new dataset.
– Select the datasource as well
as the “SQL Select Query” in
the Data Set Type
– Click Next and filter for
“WOTRACK table” then apply
the filter
– Double-click on the
WORKORDER table so that it
will be added in the
whereclause
– Click on Finish

© 2008 IBM Corporation - Confidential


BIRT

Creating a listing report using BIRT templates


 Add labels from the Palette
to the Header Row section.
 Add attributes from the
dataset created in the
previous step.
 Preview the report

© 2008 IBM Corporation - Confidential


BIRT

Creating a listing report using Maximo templates


 Prerequisites:
– Install and configure BIRT to use
Maximo libraries
– Copy report source folder to your
workstation
– Edit
mxreportdatasources.properties
under
{eclipse_root}\plugins\org.eclipse.
birt.report.viewer_2.1.2.v2007020
5-1728\birt\WEB-INF\classes so
Maximo BIRT libraries know
about the data source.
 Create a new report using “Tivoli
Maximo List Template” option
 Modify the layout as required
 Manually add Output columns in
the Data Set in the “Output
columns” section

© 2008 IBM Corporation - Confidential


BIRT

Creating a listing report using Maximo templates


 Manually write your SQL
statement
– Click on the dataSet, then
go to the Script Tab and
select “open” from the
Drop-Down menu
 Drag and drop report
output columns in the
layout
 Preview the report

© 2008 IBM Corporation - Confidential


BIRT

BIRT Report Designer Maximo extension


 Advantages:
– Maximo Oriented
• Application’s oriented, reuse same report for multiple applications
using reports.xml file
• One DataSet defined for all reports using the properties file
• Predefined Master page (Header, Footer and body)
• Predefined Maximo Theme and libraries
• Predefined templates
• Predefined report parameters
 Disadvantages:
– Manual configuration of output columns
– Manually writing SQL statements

© 2008 IBM Corporation - Confidential


BIRT

Unit 2 Overview
 Connecting to a Data Source
 Retrieving Data
 Binding Data

© 2008 IBM Corporation - Confidential


BIRT

© 2008 IBM Corporation - Confidential


BIRT

Connecting to a Data Source


 Following data sources are available through
wizards:
– JDBC
– Text Files
– XML Documents
– Web Services
 BIRT Open Data Access (ODA) allows to access
data from any source.

© 2008 IBM Corporation - Confidential


BIRT

Connecting to a Data Source


 Creating reusable data sources:
– Store connection information once in a file called a connection profile
then link the connection profile to any BIRT data source
– Create once BIRT data source then store it in a library where all
reports can access
 We are not using above standard options, we are using something
else:
– We have created a set of libraries looking at a properties file
(mxreportdatasources.properties) at design time to load the
connection properties while using MXServer information stored in
J2EE at runtime
– MXReportDataSourceImpl uses two method to load the connection:
• getRuntimeConnection()
• getDesigntimeConnection()

© 2008 IBM Corporation - Confidential


BIRT

Connecting to a Data Source


 Additional non standard BIRT steps:
– You have to call this library with every action on:
• ReportContext:
– Initialize ()
(importPackage(Packages.com.ibm.tivoli.maximo.report.script;mxReportScriptContext =
MXReportScriptContext.initialize(reportContext);
mxReportScriptContext.setDefaultLogLevel("DEBUG");
mxReportScriptContext.setDefaultLogFile("c:/temp/myreport.log");)
– Afterfactory () and not afterrender() because BIRT completes its data fetching after factory and
before rendering:
> MXReportScriptContext.close();
• DataSet
– Open () maximoDataSet=MXReportDataSetProvider.create(this.getDataSource().getName(),
this.getName());
maximoDataSet.open();
var sqlText = new String();
sqlText=“select statement”
maximoDataSet.setQuery(sqlText);
– Fetch()
if (!maximoDataSet.fetch())
return (false);
row["wonum"] = maximoDataSet.getString("wonum");
return (true);
– Add output columns and match types, manually

© 2008 IBM Corporation - Confidential


BIRT

Connecting to a Data Source


 The data source is scripted and inserted by the
template as maximoDataSource
 Other approach was to use the connection profile
(ServerProfiles.dat) which can be stored on a URL

© 2008 IBM Corporation - Confidential


BIRT

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

© 2008 IBM Corporation - Confidential


BIRT

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

© 2008 IBM Corporation - Confidential


BIRT

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

© 2008 IBM Corporation - Confidential


BIRT

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”]

© 2008 IBM Corporation - Confidential


BIRT

Unit 3 Overview
 BIRT Architecture
 Report Object Model (ROM) Specifications
 Scripting in BIRT

© 2008 IBM Corporation - Confidential


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

© 2008 IBM Corporation - Confidential


BIRT

BIRT Architecture (Cont.)


 About BIRT engines and services
– About Report Design Engine:
• Contains API for validating and generating the report design
• Report generation service uses the design engine to generate the
rptdocument
• Validates elements and structure against ROM specification
– About Report Engine:
• Allows report design files (xml) to be embedded into J2EE apps
• Provides two services:
– Generation service
– Presentation service
• Supports extensions for custom report items and custom output report
formats
• Allows developers to quickly integrate powerful report generation without a
lot of work (Like maximo integration with BIRT)
• Provides the ability to specify parameters and the output format and fetch
chat or image

© 2008 IBM Corporation - Confidential


BIRT

BIRT Architecture (Cont.)


 Generation service:
– Responsible to connect to data source
– Retrieving and processing data such as sorting , grouping,
aggregations, creating report layout and generates the rptdocument
– Report content can be viewed using presentation service or saved
 Presentation service:
– Processes the report document (rptdocument file) and retrieves data
from it
– Produces the report in the format specified in the design
– Uses Emitters (Html, Pdf, PPT etc) to generate the output format
– Chart and custom report items extend the presentation engine to
provide capability for those items

© 2008 IBM Corporation - Confidential


BIRT

BIRT Architecture (Cont.)


 Chart Engine:
– Contains API for generating charts, extends the presentation engine
 Data Services:
– Contains API to retrieve and transform data
– When used with generation services, data is taken from the
datasource
– When used with presentation services, data is taken from the
rptdocument
 ODA framework:
– Open Data Access manages and loads native drivers, opens
connections and contains extension or custom ODA drivers
– Necessary only if you have a data source that BIRT doesn’t support
(JBBC, files and webservices)

© 2008 IBM Corporation - Confidential


BIRT

BIRT Architecture (Cont.)


 Types of report items:
– Standard: Can be as simple as label to or as complex as 3D chart
– Custom: You can create a new report item (rotated text property) or extend the
standard report item (adding a property).
 About the Report Object Model (ROM)
– It is a specification for the structure, syntax and semantics of the report design.
 Types of BIRT report files:
– Report design
– Report document
– Report library
– Report template
 Extensions to BIRT:
– Custom report Item
– Custom ODA
– Custom report emitter

© 2008 IBM Corporation - Confidential


BIRT

© 2008 IBM Corporation - Confidential


BIRT

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

© 2008 IBM Corporation - Confidential


BIRT

ROM Specifications (Cont.)


 ROM Properties:
– Simple property:
• <property name=“propname”>value</property>
– Property list defines a set of properties:
• <property-list name=propName>
….
</property-list>
– Expression: Value of the property is an expression
– Structure: Contains a set of properties
 Example: Check XML Source Tab

© 2008 IBM Corporation - Confidential


BIRT

ROM Specifications (Cont.)


 ROM Slots:
– Collection of identically types elements. For example, slot containing
all available styles for a report item
 ROM Methods:
– ROM Elements can have one or more methods called event handlers
– BIRT fires those events during the course of execution of a report
– When BIRT fires an event, the appropriate event handler is executed
to handle the event (by default, they do nothing).
– By supplying the code in the handler, you can get the custom
required results. Programming language can be either Java or
JavaScript
– Report item can have 4 events: onPrepare (preparation phase),
onCreate (generation phase), onPageBreak and onRender
(presentation phase).

© 2008 IBM Corporation - Confidential


BIRT

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.

© 2008 IBM Corporation - Confidential


BIRT

Scripting in BIRT (Cont.)


 BIRT event types:
– Parameter:
• First triggered in the report executes
• Returns true or false
• Can be extended to perform extra validation to parameters
– Report Design Events:
• Initialize(): Fires when every task tries to access the rptdesign or
rptdocument
• beforeFactory(): fires just before the generation phase
• beforeRender(): fires just before the presentation phase
• afterFactory(): fires at the conclusion of the generation phase
• afterRender(): fires at the conclusion of the presentation phase

© 2008 IBM Corporation - Confidential


BIRT

Scripting in BIRT (Cont.)


– Data Source Events:
• Non Scripted Data source (supported BIRT datasources):
– beforeOpen(): fires prior to opening connection to a data
source and used to modify username, password, url etc
– afterOpen(): fires after the connection opens
– beforeClose() and afterClose()
• Scripted data sources.. In addition to the above:
– Open(): a location for the developer to open an external data
source
– Close(): a location for the developer to close external data
source
– Fetch(): a location for the developer to fetch external data
source
• maximoDataSource is a scripted datasource

© 2008 IBM Corporation - Confidential


BIRT

Scripting in BIRT (Cont.)


– Data Set Events:
• beforeOpen()
• afterOpen()
• beforeClose()
• afterClose()
• Open()
• Fetch()
• Close()
– Report Item Events:
• onPrepare()
• onCreate()
• onRender()
• onPageBreak()

© 2008 IBM Corporation - Confidential


BIRT

Unit 4 Overview
 Events Sequence
 Deployment options

© 2008 IBM Corporation - Confidential


BIRT

Report Events Sequence


 Every report has 3 phases:
– Preparation Phase
– Generation Phase
– Presentation Phase
 Preparation Phase:
– Includes parameter validation
– Initializes report design as well as prepares report elements
– Calls:
• Parameter.validate()
• ReportDesign.Initialize()
• ReportItem.onPrepare()
• ReportDesign.beforeFactory()
• ReportDesign.beforeRender()

© 2008 IBM Corporation - Confidential


BIRT

Report Events Sequence


 Preparation Phase (Cont.):
– After the initialize event, onPrepare() is called on every report item
starting from the master page and proceeds from left to right and top
to bottom
– Nested elements process before proceeding to the next element
 Generation Phase:
– Includes connecting to data sources, executing data sets, data
binding evaluation and creation of all report items in the report
– Usually, data source and data set events fire before the creation of
data bound items (For example, a table bound to data set). Exception
is a label on a footer which is created before data source and data
set fire their events
– OnCreate() fires on all report items starting from Master Page, from
left to right and top to bottom.
– If RunAndRenderTask is running, onRender() immediately fires after
onCreate()

© 2008 IBM Corporation - Confidential


BIRT

Report Events Sequence


 Row Execution sequence:
– There are 3 kind of rows:
• Header
• Detail
• Footer
– Row.onCreate()
– Row.onRender()
– For every Cell in the row:
• Cell.onCreate()
• Cell.onRender()
• For every report item in the cell:
– Item.onCreate()
– Item.onRender()

© 2008 IBM Corporation - Confidential


BIRT

Report Events Sequence


 Table Execution Sequence:
– DataSet.beforeOpen()
– DataSet.afterOpen()
– For every row in the dataset:
• DataSet.onFetch()
– Table.onCreate()
– Table.onRender()
– Process Row Execution
 Presentation Phase:
– Launches the appropriate
emitter and produces the
output

© 2008 IBM Corporation - Confidential


BIRT

Overview

Report Designer 1 Report Engine

Eclipse Eclipse Chart Eclipse Custom Data Charting


Report
Designer
DTP
ODA
Designer WTP Designer Transform.
Services
Engine 5
2 5 3 Generation Presentation
Report Design Engine Services Services
4

XML Report
Report Data Document
Design
Data

© 2008 IBM Corporation - Confidential


BIRT

Deployment options
Paginated HTML, PDF, TOC, Bookmarks, CSV

Eclipse Plugin J2EE AS

Web Viewer Web Viewer Java Application


ReportEngine ReportEngine ReportEngine

RptDesign
XML RptDocument
Design File Report
Document

© 2008 IBM Corporation - Confidential


BIRT

• BIRT Utilizes the


Mozilla Rhino
Javascript engine.
BIRT • All the features of
JavaScript 1.5
• BIRT Script allows
for use of Java
classes and
methods (regular
expression,
searches, etc) as
well as custom Java
objects
• Event Handlers can
Awesome! be external Java
objects, not just
Javascript

© 2008 IBM Corporation - Confidential


BIRT

Questions?

Click on the hand icon on the icon toolbar at the top


of your screen to indicate you have a question. We
will assign you a microphone. You can activate the
microphone by pressing the control key on your
keyboard
Or type your question into the chat window of the web
conferencing tool.

© 2008 IBM Corporation - Confidential

Anda mungkin juga menyukai