Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2 2
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Agenda
BIRT Overview Lesson 1 Simple Reports Lesson 2 Charting in Reports Lesson 3 BIRT Scripting Lesson 4 Report Libraries and Templates Lesson 5 Deploying with the Web Viewer
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Objectives
Become Familiar with BIRT Designer Know how to create and design BIRT reports and projects Access Data in BIRT Reports Report Layout and Formatting Using Styles Sort, Group Data Use Report Parameters Create and Format Charts Write Expressions Using Scripting Creating and Using Libraries and Templates Deploy BIRT Reports
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Hard
5 5
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Managers
Reports that support business activities Ever changing business requirements Quick availability of reports Reports that also look good Content as HTML and PDF
Embed pre-designed reports in application Designs reports using Eclipse-based designer Creates report libraries & templates
End Users
Java Developers
Saves calories vs. JSP/Java Minutes vs. days for HTML, vs. weeks for PDF Minutes to modify as user requirements change Iterative development gets the right reports quicker
Report Developers
Powerful and easy to use report designer Creates & uses report libraries & templates Flexible, web page design metaphor Ability to leverage complex components
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Data Data
Report Document
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Reporting
Objectives: Become Familiar with BIRT Workbench To create a BIRT Reporting Project To create a BIRT Report Introduce the BIRT Workbench Create a simple Product Profitability & Inventory Report End User Customizing via Report Parameters
2008 by John Ward made available under the EPL v1.0 | Date | Other Information, if necessary
BIRT Data
Data Sources, Data Sets, Parameters
BIRT Layout
Grids, Tables, Controls, Data Binding
BIRT Code
Expression Builders vs. Code Pages
BIRT Preview
HTML View, BIRT Viewer, PDF Viewer
9 9
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Birt Designer
Graphical report designer, similar to web development applications such as Dreamweaver or Nvu Provides visual environment to quickly draw reports Provides mechanisms to quickly create data connections Provides Project Management
10
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Workbench
11
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Navigator
Navigates through Eclipse projects and files under those projects Allows user to run report inside of BIRT
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Outline
Provides hierarchy of current report Allows for easy navigation of report elements to change properties in the property pane When selecting libraries, use the outline to copy non-visual components such as data sources and sets
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Palette
Contains a number of visual elements used in BIRT report designs Similar to Toolboxes in MS Visual Studio and other visual IDE
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Data Explorer
Contains.
Data Sources: Connections to database. Data Sets: Same as a Recordset. Allows users to navigate through Query Results. Report Parameters: Used as the interface for report parameters that will be passed to a Data Set.
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Report Designer
Area where report layout is designed, previews of the report are seen, scripts and events are coded, and XML source for report can be viewed.
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Properties Pane. Properties for BIRT objects can be modified, such as Data Set Binding, Font information, formatting for Data Set returns such as Row Highlighting and Color Alternation.
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Grids
Used to position elements on page Contains no Data Bindings
Tables
Grids with Data Binding Has Header, Detail, and Footer bands
Lists
Single Column Tables
18
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
19
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Setting up a Project
BIRT uses the eclipse paradigm of using projects File/new/project From the project wizard, select report project from under BIRT Set project name Projects are shown in the eclipse navigator
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Setting up a Report
With eclipse project open From file menu
File/new/report
From navigator
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Containers
22
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Data Access
Data Sources
Handled data connections
Data Sets
Defined Data to be used in Report
Parameters
Used for User Interaction to Filter Data Cascading Parameters
Parameter Binding
23
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Setting up JDBC
Setup is done via the Data Explorer when setting up a new data source. Click on the manage drivers button. Point to JDBC ZIP/JAR file. In order to set up connection, you must know the JDBC URL. Can set a template of the JDBC URL format for future use of driver. This makes it easier for future connections. Datasources can be added to libraries for report projects that use consistent datasources.
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Report Parameters
Used to create dynamic result sets from queries Binds user input to filter results sets Parameters get assigned in sequential order, first parameter gets assigned to first bind variable in query Report Parameters get stored as global variables in reports, accessible in scripts and expressions in addition to data.
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Tables
Slots
Header Detail Footer
Data Binding
Makes table/list aware of values in Data Set
Grouping
Group on value in Data Set
Sorting
Sort on value in Data Set
27
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Styles
Built In CSS Themes
28
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Aggregates
Aggregate operations
Sum Avg Count
29
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Viewing Reports
Preview
Web Viewer
Emitters
30
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Report Run
Can Run from Navigator or from File Menu Reports that get run open in separate browser window. Results can be saved. Option to view as HTML, Word, Excel, PDF
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
32
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
33
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
2008 by John Ward made available under the EPL v1.0 | Date | Other Information, if necessary
35
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Pie Charts
Bar Charts
37 37
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Bar Charts
38 38
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
39 39
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Line Charts
40 40
Horizontal, Vertical 2D, 3D Various types of markers Line styles, thicknesses Drawn as Line, Curve
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Stock Charts
41 41
Scatter Charts
42 42
Horizontal, Vertical 2D Various types of markers Line styles, thicknesses Drawn as Line, Curve
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Area Charts
Horizontal, Vertical 2D, 2D w/depth, 3D Stacked, Side-by-side Percent, Logarithmic Drawn as Line, Curve
43 43
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Difference/Range Charts
2D. Curve or Straight lines. New Negative/Positive Fill also works for other types.
44 44 Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Meter Charts
Gantt Charts
2D. Custom Bar width Custom Start/End Markers Data : Task ID / Start Date, End Date, Task Name
46 46 Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Bubble Charts
47 47
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
48
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Interactivity in Charts
Can jump to anchor points Drill Through to other Reports Interactivity through Javascript
49
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
50
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
51
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
52
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
2008 by John Ward made available under the EPL v1.0 | Date | Other Information, if necessary
Scripting
For some logical calculations and report-centric tasks, a JavaScript based scripting engine has been embedded into BIRT. Report events can be overridden to implement custom actions, such as creating calculated fields on row retrieval from a dataset. Variables can be declared and used persistently throughout reports through scripting mechanism. http://birtworld.blogspot.com/2006/03/java-and-session-objectsin-birt.html Later presentation more focused on Scripting: Advanced BIRT Report Customization tell Virgil and Jason that I sent you ;)
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Scripting Background
Do you know Javascript?
55
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
BIRT
Awesome!
BIRT Utilizes the Mozilla Rhino Javascript engine. 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 be external Java objects, not just Javascript
56
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Simple, 1 line expressions Used in data elements to return single result Used in visual elements as a simple condition or to retrieve display values
Triggered by Events in BIRT onOpen onRender Fetch Complex, multi line statements Contain advanced logic to manipulate BIRT elements Can reference and set external elements Can invoke external Java objects
2008 by John Ward made available under the EPL v1.0 | Date | Other Information, if necessary
Demo Expressions
Scenario: Ernie wants a Employee Sales Performance Report. Have a chart to show employee sales against a quota, and create a computed column for grouping. Objective: Demonstrate basic expression in Data Elements, complex expressions in the computed column and groupings.
58
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
59
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
60
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
61
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Objectives: To use & build BIRT Report Libraries in building reports To use & build BIRT Report Templates
2008 by John Ward made available under the EPL v1.0 | Date | Other Information, if necessary
Stores report items shared between multiple developers/reports Use multiple libraries in a report design Changes to report items in library reflected in all report designs
Open design in designer Generate report
Group related styles into a theme Can convert a report design into a report library File extension - .rptlibrary Define resource folder location in Window->Preferences->Report Design->Resource
63
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
64
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
65
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
66
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
2008 by John Ward made available under the EPL v1.0 | Date | Other Information, if necessary
Online Reports
None BI based solutions Cumbersome and time consuming to develop Error prone No consistent interfaces
68
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
69
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
70
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
71
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
72
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
73
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
74
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
75
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
76
Basic BIRT | Report Design | 2008 by John Ward made available under the EPL v1.0
Q/A
2008 by John Ward made available under the EPL v1.0 | Date | Other Information, if necessary