22
© 2002 IBM Corporation Confidential | Date | Other Information, if necessary © 2005 by Actuate; made available under the EPL v1.0 Introduction to the BIRT Report Object Model Paul Rogers Actuate Corp. BIRT PMC

Introduction to the BIRT Report Object Model€¦ · Introduction to the BIRT Report Object Model ... Presentation Services Eclipse Report ... Use default BIRT JSP pages for UI,

Embed Size (px)

Citation preview

© 2002 IBM CorporationConfidential | Date | Other Information, if necessary© 2005 by Actuate; made available under the EPL v1.0

Introduction to the BIRT Report Object Model

Paul RogersActuate Corp.BIRT PMC

2 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

BIRT Overview

Eclipse top-level projectInitially focused on embedded reporting for Java developersHighly extensibleTarget user is Java developer

Will evolve to support report content developers

Users & contributors wanted!Timeline

Nov, 2004: BIRT project accepted

Early 2005: All BIRT code put under CVS

EclipseCon: 1.0M1 build available, looking for QA eyes

May, 2005: Release 1

3 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

BIRT Architecture

Data

Report Engine

GenerationServices

PresentationServices

EclipseReportDesigner

Report Design Engine

Web BasedReportDesigner

CustomReportDesigner…

XMLReportDesign

ReportDocument

HTMLPDFPrintXML…

Data Transform.Services

ChartingServices

CustomServices…

Report Object Model defines XML design formatReport Design Engine is API for the ROMEngine executes a ROM-defined design

4 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Example BIRT Report

5 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

ROM Overview

ROM = Report Object ModelROM provides a rich report creation model

Data DefinitionData Sources, Data Sets

Visual Layout: Report ItemsGrid, Text, Label, Data, Table, List, Image

ParametersStylesScriptingExtensibility

6 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Data Source Element

Defines a connection to a data providerBIRT supports JDBC in Release 1Others added though extensionsExample JDBC data source properties

Driver

URL

User Name

Password

Just define it; BIRT takes care of opening, closing itAny number of data sources per report

Customer info from Oracle, Sales info from SQL-Server

7 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Data Set Element

Represents a specific data setSQL query, stored procedureFlat file, XML, CSVEJB, POJO, SOAPDefined using scriptingWhatever you want: just create an extension

JDBC & scripted data sets appear in Release 1QueryInput parameters, output parametersProduces a set of data rowsColumn informationAny number of data sources & data sets

Master/detail, side-by-side, one-after-another

8 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Data Transform

Report data operationsSort, sum, group, filter, etc.

Based on:Data set

Report structure

Push to data source if possibleSort, filter, etc.

Perform in BIRT if necessaryLimited feature data source (XML, flat files)

References scripting

Net: say what you want; BIRT gets it done

9 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Table Element

ROM Table = HTML table + data set iteratorParts of a table

Header, Footer

Detail

Groups: Header, Footer

Data-related propertiesData set

Parameter bindings

Filters

Sorting

Wide variety of aggregates (totals)

10 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Label, Data & Image Elements

Simple report items: displays single valueLabel

One piece of text

Complete i18n/l10n support

DataData row column, expression or aggregate

ImageURL or embedded image

Wide variety of CSS-based formattingConditional formatting, conditional visibility

11 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Grid Element

Grid Element = HTML tableProvides quick & easy placement of report items

Left/center/right titles & headings

Side-by-side tables & charts

Label: value

Provides full CSS formatting rulesBorders, colors

Padding, margins

Alignment

12 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Text Element

Text = text + HTML formatting + data valuesModern version of “mail merge”

Analogy to PHP, JSP

Create titles, form letters, other blocks of textHTML formatting works for all output formats<value-of> tag provides

Insert any kind of data: expression, script, etc.

Provide formatting of value

Additional formatting featuresKeep with next, widow & orphan prevention

Line spacing, paragraph indent

13 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Example Report Items

Grid

Table

Table

TextImage

DataItems

Grid

14 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

List Element

List = anything + data set iteratorExample: form letter w/text, charts, tablesList bands

Header, footer

Detail

Groups: header, footer

List has no visual properties, it is purely an iteratorBand can contain multiple items

Subreports

Conditional content

15 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Chart Element

Powerful charting capabilitiesBar charts, pie charts, line charts, etc.Many customization itemsMultiple Y-axesGreat color choices

16 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Report Parameters

Passes data from user into reportSome uses

Custom filters

Custom formatting

PropertiesName, type, prompt

Static or dynamic choice lists

Use default BIRT JSP pages for UI, or create your ownFor custom pages

Craft pages by hand

Generate them using parameter metadata

17 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Styles

Separates layout from formattingEnsure consistent formatting within a report

Ensure consistency across reports (after Release 1)

Very similar to CSS stylesMost CSS properties and settings

Adds report-specific properties

Cascade rules based on CSSContainer-to-content

Pre-defined selectors for most report items

Also, position-based: list & table bands, group levels

18 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Scripting

Real-world reports often require application-specific codeComputed columnsValue expressionsConditional formattingReport execution eventsMore!

ROM uses JavaScriptExpressions & scripts have same syntax

Excellent Java integration

Add custom business logic to reportOr, access logic in Java (for separation of logic & presentation)

19 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Extensibility – Report Items

Define your own report itemsExamples: stop lights, gauges, web controls

Define a new extended elementProperties, methods

Custom property sheet, builder (optional)Custom run-time behavior (optional)Custom rendering

To image, or direct to HTML, PDF, etc.

Full access to report data, styles, etc.Extension appears same as built-in item

20 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Extensibility – Data Sources & Data Sets

Open Data Access frameworkExamples: SOAP, EJB, web logs, CSVDefine a driver for your custom data providerDesign-time features

Specialized properties

Design time UI

Runtime featuresData source (connection) implementation

Data set implementation

21 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Call to Action!

Download BIRT and walk through a tutorialhttp://www.eclipse.org/birt

Attend BOFGeneral discussionUsability testing Thurs. 12-2

Join us for an informal chat at the Poster ReceptionToday 5:30 - 7:30, Atrium

Help us in Usability TestingWed/Thu conference hours, Oak Room (sign-up sheet on message board)

See us at the Actuate booth in the Exhibit HallBIRT news groupContact Project Management Committee (PMC)

Paul Rogersprogers at actuate.com

22 BIRT Report Object Model | © 2005 by Actuate; made available under the EPL v1.0

Q & A