blob: cd1dd734d6b6542f7d9493302387a27b368d1005 [file] [log] [blame]
<title>Eclipse BIRT Overview</title>
<link rel="stylesheet" href="../style/compose.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- Google Tag Manager -->
<noscript><iframe src="//"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->
<p class="head">BIRT Overview</p>
<p class="subhead">Developing with BIRT</p>
<h1>Data Customization</h1>
As mentioned above, reports often require additional business logic to prepare
data for presentation. BIRT provides a number of tools to help:
<dl class="arrow-list">
<dt>Computed Columns
<dd>Databases organize data for storage, but often data must be combined to prepare
it for presentation. Computed columns let you define additional data set columns
based on business logic. The logic can be a simple expression, a script, or a
call to existing Java logic.
<dt>Input and Output Parameters
<dd>Many data sources support parameters: the ability to pass data into or
out of a query. For example, SQL Select statements can include input parameters.
Stored procedures can have
both input and output parameters.
<dt>Column Meta-data
<dd>You can provide column aliases when the names provided by the data source are
<dd>Some data sources, especially SQL, provide excellent built-in filtering
features. However, some data sources (flat files, application objects) may not
provide filtering. In other cases, the filter conditions are defined in scripts
or Java code. You can define such filters as part of the report, and the BIRT
engine will apply them automatically.
<dt>Scripted Data Sets
<dd>Some reports require access to specialized or unusual data. You can create
such access in Java or scripts and use the scripted data set to integrate that
logic into your report.
<h1>Conditional Formatting</h1>
While some reports have a fixed format, others require conditional formatting.
For example, a report that lists transactions may want to present a sale differently
than a return. Or, a customer service report may want to show colors that indicate
which metrics are above, at or below plan. BIRT provides several conditional
formatting features:
<dl class="arrow-list">
<dt>Conditional Visibility
<dd>You can hide report elements based on data. In the transaction report above, you
can create sections for both sales and return transactions, then hide the one that
is not required for a given record.
<dt>Value Mapping
<dd>Database data often uses code values: M/F for male or female, 1/2 for sales and
returns, etc. Value mapping lets you define a mapping from database value to
display value. For example, we can map the value "1" to "Sale" and the value
"2" to "Return."
<dd>Simple expressions let you select the style to apply to a given report item.
For example, in the customer service report, we can use green to show metrics
above plan, and red to show those below plan.
BIRT provides scripting based on JavaScript (formally known as ECMAScript).
JavaScript is often thought of as a client-side scripting language, but it works
just as well on a server for expressing report logic. In particular, JavaScript
provides excellent integration with your existing Java logic, making it very
simple to call your logic from BIRT reports.
BIRT provides a complete set of JavaScript objects to access the Report Object
Model: a representation of both the design and runtime aspects of your report,
allowing complete control of the report to handle even the most complex report
formatting tasks.
<h1>Java Event Coding</h1>
In addition to JavaScript, events can be coded in Java. BIRT supplies a
set of interfaces for report item creation and data collection.
Once the event is written in Java and associated with a report element, the report
can be debugged through the Eclipse Java Development Tools.
<h1>Project Management</h1>
BIRT integrates with the Eclipse project management features to organize related
reports. BIRT also works with Eclipse CVS support for source management. BIRT's
XML report design format makes it easy to compare two reports, or two versions of
the same report, to track changes.
Anyone who has designed a web page knows that the same visual styles get used
over and over. Cascading Style Sheets (CSS) allow web designers to extract style
information from content, and to reuse style over and over.
BIRT provides a similar style feature. Indeed, BIRT styles are based on CSS
styles, making BIRT's visual properies familiar to web application developers.
BIRT styles cascade, allowing you to set a style in one place and have it affect
the entire report, a section of the report, or a single report item. In addition BIRT
allows importing of Cascading Style Sheets.
Typical applications include many related reports. A simple customer application
may include an alphabetical customer listing, customers sorted by geography,
customers assigned to specific sales reps, customers filtered by status and more.
In general, users frequently want another variation to solve specific business
The result is that reporting applications consist of suites of closely related
reports. The same data sources, styles, business logic, report items and more
are used across many reports.
BIRT supports libraries that organize these
shared resources. Libraries can contain any report element including styles,
data sources, report items, scripts and so on.
The web allows worldwide access to your application. BIRT provides excellent
support for internationalization and localization.
<dl class="arrow-list">
<dt>Text Localization
<dd>You can create a single report that automatically displays strings in the
user's language. All labels and report text can be externalized and translated using the
standard Java localization rules. At runtime, BIRT uses resource keys to locate
the correct translations of your text.
<dd>BIRT provides locale-aware data formatting, meaning that a date can appear
in mm/dd/yy format for US users, and dd-mm-yy format for Europeans.
<dt>Dynamic Formatting
<dd>Chinese text is very compact, German is often quite lengthy,
and English of medium size.
BIRT automatically adjusts the size of report items to fit their
content to avoid the need to test the report with every possible translation. BIRT
works like HTML in this regard: the size of content expands as needed to hold its