www.devoxx.com
Integrating BIRT Reporting into Applications
Virgil DodsonEvangelistActuate – BIRT Exchange
www.devoxx.com
Overall Presentation Goal
Understand some of the reporting requirements you may encounter as you integrate BIRT
Reports into Java Applications
www.devoxx.com4
Speaker’s qualificationsVirgil Dodson is a Developer Evangelist at Actuate Corporation
…and Forum Moderator, Blogger at BIRT Exchange community site
…and has presented BIRT technology at many conferences including Dr.Dobbs, EclipseCon, EclipseWorld, JAX, JFS, Rational, WJAX, MySQL, User Groups
www.devoxx.com5
BIRT Project Overview
BIRT Designer
BIRT Runtime
BIRT Report Integration Options
Reporting Requirements to Consider
Actuate BIRT Product Line
Resources for Integrating BIRT into Applications
Agenda
www.devoxx.com6
Open Source Reporting: Eclipse BIRT
0
200
400
600
800
1,000
1,200
1,400
1,600
1H05
2H05
1H06
2H06
1H2007
2H2007
1H2008
2H2008
Over 5 Million Downloads
• Business Intelligence and Reporting Tools• Open source initiative as part of the Eclipse Foundation• Founded, organized and led by Actuate Corporation• Project launched in October, 2004
• Next generation reporting technology
• Eclipse-based Report Designer• Web-centric design metaphor• Open Source with rapid
adoption• Standards based & highly
extensible• Open XML design format• Build community and ecosystem
Project Goals
Do
wn
load
s (
1,0
00s)
Do
wn
load
s (
1,0
00s)
www.devoxx.com7
BIRT Project Users
Report Developers Drag & Drop authoring, charting
Advanced Report Developers Scripting, Script API
Runtime Integration Developers BIRT Viewer and Engine APIs
Report Design Integration Design Engine API
Extension Developers BIRT Extension Points
Core Development Eclipse Development, Open Source
Report Developers Drag & Drop authoring, charting
Advanced Report Developers Scripting, Script API
Runtime Integration Developers BIRT Viewer and Engine APIs
Report Design Integration Design Engine API
Extension Developers BIRT Extension Points
Core Development Eclipse Development, Open Source
AudienceAudience FeaturesFeaturesEasy
Co
mp
lex
www.devoxx.com8
Report Designer
High Level BIRT Architecture
Report Engine
PresentationServicesReport Design Engine
XMLReportDesign
ReportDocument
HTMLPDFExcelWordPowerPointPostScript…
EclipseReportDesigner
GenerationServices
DataTransform.Services
ChartingEngine
Data
Data
ChartDesigner
Eclipse DTP,WTP,…
CustomDesigner
www.devoxx.com9
BIRT Report Designer
What is the BIRT Report Designer?
• Open source based and highly extensible
• Modern, web-page design metaphor
• Easy to use and powerful
• Library and template components
• Scripting in Java and JavaScript
• Leverages the powerful Eclipse IDE
What is the BIRT Report Designer?
• Open source based and highly extensible
• Modern, web-page design metaphor
• Easy to use and powerful
• Library and template components
• Scripting in Java and JavaScript
• Leverages the powerful Eclipse IDE
www.devoxx.com10
Report Gallery
Employee Directory
Product Catalog
www.devoxx.com11
Report Gallery
Form Letter
Crosstab/Matrix Report
www.devoxx.com12
Report Gallery
Sales Dashboard
Sales Invoice
www.devoxx.com13
Chart Gallery
www.devoxx.com14
Chart Gallery
www.devoxx.com15
Chart Gallery
www.devoxx.com16
BIRT/Google Maps Mashup at EclipseCon
www.devoxx.com
DEMOQuick Look at the BIRT Designer
www.devoxx.com18
BIRT Runtime
www.devoxx.com19
BIRT Report Engine
The BIRT Report Engine allows you to write Java code to read in report designs, apply any parameters etc, and output a report.
•Used in standalone Java applications
•RCP applications
•Batch applications
•Used in web applications
•Sample code at BIRT Exchange
www.devoxx.com20
Report Engine API Overview• REAPI supports the following operations:
• Discover report parameters
• Get default parameter values
• Generate report documents. (rptdocument)
• Generate report output (PDF, HTML, paginated HTML, DOC, XLS, PPT, Postscript)
• Fetch images and charts for a report
• Export report data as CSV
• Retrieve Table Of Contents, Bookmarks
www.devoxx.com21
Engine Task Processes
3 tasks related to report execution and rendering
• RunTask
• RenderTask
• RunAndRenderTask
Using RunTask and then RenderTask means multiple processes to generate and view a report.
RunAndRenderTask happens in single process so event firing order is different
www.devoxx.com22
Engine Task Processes (cont.)• Engine Tasks used with the Example Web Viewer
• ‘frameset’ mapping uses RunTask and RenderTask… export from Viewer uses RenderTask
• ‘run’, ‘preview’ mapping uses RunAndRender Task
• Engine Tasks used with the BIRT Designer
• Web Viewer Preview uses RunTask and then RenderTask
• Preview tab, plus rest of Preview icons use RunAndRenderTask
www.devoxx.com23
Chart Builder
RptDocumentReport
Document
JavaScript Events
Optional Java Events
RptDesignXML
Design FileGeneration Phase Presentation Phase
Paginated HTML
CSV
WORD
XLS
PostScript
PPT
ReportDesigner
DesignEngine
Report Engine
optional
BIRT Pipeline with respect to the APIs
Report EngineReport Engine
ChartEngine
www.devoxx.com
DEMOQuick Look at REAPI example
www.devoxx.com25
BIRT WebViewerExample
The BIRT Web Viewer is an open source example implementation of a web application for running and viewing BIRT reports and uses the Report Engine API
•To view the report in the viewer complete with toolbar, navigation bar and table of contents features, use:
http://localhost:8180/birt23/frameset?__report=sales.rptdesign
•To view the report without the toolbar, navigation bar and table of contents features, use:
http://localhost:8180/birt23/run?__report=sales.rptdesign
•Other included Servlets are preview, document, output, extract
www.devoxx.com26
BIRT WebViewerExample (cont.)
•To go directly to an output format like PDF, use:
http://localhost:8180/birt23/run?__report=sales.rptdesign&format=pdf
•To get only a chart or table displayed as a reportlet, use:
http://localhost:8180/birt23/run?__report=sales2.rptdesign&__bookmark=birtchart&__isreportlet=true
www.devoxx.com27
without toolbar
with toolbar
www.devoxx.com28
as PDF
as reportlet
www.devoxx.com29
www.devoxx.com30
Evolution of an Application
1 “Just give me a list of customer sales and the best performing city and state.”
www.devoxx.com31
Evolution of an Application
“We also need to dynamically link the customers’ to another report”
12
www.devoxx.com32
Evolution of an Application
“We’d like to slice this by sales rep, too, grouped alphabetically.”
12
3
www.devoxx.com33
Evolution of an Application
“Actually, we’d like to be able to produce a completely separate report for each rep.”
12
3
4
www.devoxx.com34
Evolution of an Application
“Maybe they should be able to change their view by themselves.”
12
3
4
5
www.devoxx.com35
Evolution of an Application
“We have quite a few users using this system now and there’s some fairly sensitive data in there...”
12
3
5
6
4
www.devoxx.com36
Evolution of an Application
“We need to schedule these reports to run every other week.”
7
12
3
5
6
4
www.devoxx.com37
Evolution of an Application
7
8
12
3
5
6
“We need to track which users have used the system.”
4
www.devoxx.com38
“They need to set up their own reports with new data.”
Evolution of an Application
9
6
8
4
7
12
3
5
www.devoxx.com39
Evolution of an Application
9
6
8
4
7
12
3
5
“We need these dashboards linked to our business process”
“We need to be able to approve or reject the changes”
“We need a single version of the truth”
“We need to analyze the information in Excel”“We don’t want to be waiting around for the results”
“We don’t want to be re-typing information from these dashboards into our other applications…can we export?”
“We need to be able to see the underlying detail”
“We need to print the dashboard out to take into meetings”
“We need the output as Excel”
“We need Flash charts”
“We need to easily find stuff within the dashboard”
“We need to know who’s looked at the information”
“We need a simple way to see the entire contents of the detail report”
“We need a view that looks like an existing flow chart”“We need these dashboards in multiple languages”
www.devoxx.com40
Report Integration and Deployment User Requirements
Report browsing and management•Easily add additional reports•Folder based storage and management of reports•Search and filtering lists of reports•Report versioning and automated deletion•Report descriptions and “headlines”
Report generation and scheduling•On-demand, “run now and I’ll wait” report generation •On-demand, “run now in background” report
generation•Scheduled report generation (one-time, recurring…)•Event-based scheduled report generation•Sequenced (daisy-chained) scheduled report generation•Easy to use parameter collection
Report sharing, distribution and notification•Automatic notification when report is completed•Attached report to email notification•Share reports in any folder with other users•Notification subscriptions (channels)
www.devoxx.com41
Report browsing, generation and scheduling
• User interface integrated into application experience
• Reports and integration are branded with application
• Parameter collection and management
Security
• Secure reports individually or in folders
• User and role-based security support
• Integration with application single-signon
• Integration with application security model
Scalability and high availability
• Scalable for large reports (many pages)
• Scalable for large numbers of reports
• Scalable for large numbers of users
• Clustering support
• High availability and failover
Report Integration and Deployment Integration Requirements
www.devoxx.com42
Actuate BIRT Product Line
Actuate Java Components
Components that provide end user interactivity, ad-hoc BIRT reporting, report browsing, etc.
Actuate BIRT Designer
Desktop tools for professional IT developers and power usersOpen Source BIRT plus Flash charts and gadgets, one-click installer and data adapters
iServer ExpressReady-to-go deployment servers for BIRT ReportsScheduling, security, email notifications, report management, …
www.devoxx.com43
Actuate BIRT Designer
www.devoxx.com44
Actuate Java Components• A Web Application (WAR file) that contains:
1. Actuate BIRT Viewer – enables end users to view BIRT reports (**included with Actuate BIRT Designer License)
2. Interactive Viewer – enables end users to view BIRT reports, as well as analyze and personalize a BIRT report to meet their own needs
3. BIRT Report Studio – empower business users to use a browser to design ad-hoc reports and view BIRT reports
4. Actuate BIRT Deployment Kit – enables end users to view BIRT reports and provides file/folder browsing, configurable caching
www.devoxx.com45
Actuate BIRT Viewer• Runtime support for BIRT reports with Flash content,
Report documents as data sources
• Repository authorization integration, Authentication (IPSE based) integration,
• Client side scripting• Progressive Viewing, • Temp file/transient store management
www.devoxx.com46
Actuate Interactive Viewer
Hide/show elements
Custom calculations
Show/hide columns
Formatting text and currencies
Conditional formatting
Modify labels
Toolbar• Table of
contents• Page
navigation• Printing• Export data• Save
Grouping
Sorting
Simple and advanced filters
www.devoxx.com47
Actuate BIRT Report Studio
User-selected Information Object
Calculatedcolumn
Data styles
Template objects
Drag-and-drop palette
Format text and
currencies
Toolbar• Cut/Copy/Paste• Delete• Undo/Redo• Chart• Table• Insert• Group• Filter• Prompt• Format• Run• Print• Export
Grouping and sorting
Easy to use… end-users do not know SQL… iterative development
www.devoxx.com48
Actuate iServer ExpressDeploy, Manage, Schedule, Run and Share
BIRT Reports
Quickly and Easily
• Web-based user interface to run, view and share reports
• On-demand, time and event based scheduling
• Automated email distribution of reports• User interface to collect report parameters• Secure reports with User and Role security• Report management, versioning and control• Variety of application integration options• Web Services Interface
49
www.devoxx.com
•Windows Show View Other… •Report and Chart Design Report Examples
Report and Chart Examples View
50
www.devoxx.com
New and Updated Publications
Second EditionRevised and UpdatedSecond EditionRevised and Updated
Second EditionRevised and UpdatedSecond EditionRevised and Updated
New BookNew Book
51
www.devoxx.com
http://www.eclipse.org/birt
52
www.devoxx.com
BIRT Exchange Community Site• Centralized Knowledge Hub for BIRT Developers• Access Downloads, Demos, Tutorials, Tips & Techniques, Webinars• Easy for users to contribute content, share knowledge• Enables developers to be more productive and build applications faster
www.birt-exchange.comwww.birt-exchange.comDownload• Documentation• SoftwareShare Knowledge• Reports, Code, Tips• ForumsFind• Search, Sort• Rate, Comment
53
www.devoxx.com
BIRT Exchange DevShare
• Data Integration• BIRT Scripted Data Source Example• BIRT Connection Pooling• Web Services Data
• Application Integration• Java Event Handler• Placing Java Classes• Run BIRT Reports at Command Line• Batch Files to Schedule BIRT Reports
54
www.devoxx.com
BIRT Exchange DevShare (cont.)
• Report Engine API• Using the BIRT Report Engine API• Calling the BIRT REAPI• Execute BIRT Reports from Java class• API – Examples
• Web Viewer• Exploring BIRT Deployment Options• Deploying BIRT WebViewerExample in Tomcat• Birt Viewer 2.3 User Reference• BIRT URL Security• Custom Parameter page
55
www.devoxx.com
BIRT Exchange DevShare (cont.)
• Additional Integration Examples• JBoss BIRT Portlet• Integrating BIRT with Hibernate and Struts• BIRT 2.2.2 and Stripes 1.5• Using BIRT with JBoss Seam• Integrating BIRT with Spring• Deploying BIRT RCP App through Java Web Start• Deploy BIRT on GlassFish
56
www.devoxx.com
BIRT Exchange DevShare (cont.)
• Actuate Viewer• JSAPI• Customizing Security in Deployment Kit
• iServer Express• iServer Express Integration Technology download• Java client for the IDAPI• Implementing iServer Express security with Java Report
Server Secruity Extension
www.devoxx.com
Q&A