1 / 77

Basic BIRT Report Development

Basic BIRT Report Development. John Ward, Innovent Solutions. BIRT and us – Who are I? Who are you?. Who are we? John Ward, BIRT user Innovent Solutions Author: Practical Data Analysis and Reporting with BIRT Who are you? Name, Company, technical background (C, SQL, Java, reporting…)

jaunie
Download Presentation

Basic BIRT Report Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Basic BIRT Report Development John Ward, Innovent Solutions

  2. BIRT and us – Who are I? Who are you? • Who are we? • John Ward, BIRT user • Innovent Solutions • Author: Practical Data Analysis and Reporting with BIRT • Who are you? • Name, Company, technical background (C, SQL, Java, reporting…) • Experience with BIRT • What are you hoping to get out of today’s presentation? 2

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

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

  5. BIRT Tasks – Audience BIRT Report Developers Advanced BIRT Developers Deploy Experts Reporting Integration BIRT Extension BIRT Core Development PresentationFocus Easy Hard • Drag & Drop, Charting, Properties • BIRT Scripting • BIRT Viewer • Design Engine API • BIRT Extension Points • Eclipse Development 5

  6. BIRT Target Users & Benefits Managers • Focused on $, developer productivity • End user satisfaction • Minimizes Eclipse developer training • Increase developer productivity • Lower costs • Reports that support business activities • Ever changing business requirements End Users • 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 JavaDevelopers ReportDevelopers • 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 • Powerful and easy to use report designer • Creates & uses report libraries & templates • Flexible, web page design metaphor • Ability to leverage complex components

  7. High Level BIRT Architecture Report Designer Report Engine EclipseReportDesigner Eclipse DTP ODA Chart Designer Custom Designer Data Transform. Services Charting Engine HTML PDF Print Presentation Services Generation Services Report Design Engine Data XMLReportDesign ReportDocument Data

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

  9. The Quick Tour • The BIRT Perspective • Data View, Palette, Outline View, Layout, Code, Preview • 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

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

  11. Workbench

  12. Navigator • Navigates through Eclipse projects and files under those projects • Allows user to run report inside of BIRT

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

  14. Palette • Contains a number of visual elements used in BIRT report designs • Similar to Toolboxes in MS Visual Studio and other visual IDE

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

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

  17. Areas of the BIRT Workspace (Cont.) • 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.

  18. Top Level Report Layout • Master Pages • Contains elements visible on every page, such as page headers • 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

  19. Demo – Static Report Background: Our Manager, Mr Ernie, wants a generic letterhead. Build a letter head for Classic Cars using containers to format the layout. Objectives: Familiarize you with the concept of containers for Report Elements

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

  21. Setting up a Report • With eclipse project open • From file menu • File/new/report • From navigator • Right-mouse click on report project, new/report • Select project to associate report with and give file name

  22. Containers

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

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

  25. Creating a Data Set • With data source(s) created, right-click on data set and chose new. • Type in SQL query. • Can create Joined Data Sets to combine 2 or more data sources. • Here I am using a questionmark, which will bind a report parameter to a query. • Datasets can be added to libraries. • http://birtworld.blogspot.com/2006/05/joined-data-sets-with-birt-21.html

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

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

  28. Styles • Built In • CSS • Themes

  29. Aggregates • Aggregate operations • Sum • Avg • Count • Done at the binding level

  30. Viewing Reports • Preview • Web Viewer • Emitters

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

  32. Demo – Building Reports - Product Profitability Report Scenario: You work for the Classic Cars company. Your boss, Mr Ernie, wants a report that is a simple listing of all product sales in the database, with the total costs and total profits for each product arranged by State and City, sorted in order of decreasing amounts of total profits. Provide a report parameter to limit the listing to just 1 state. Make sure that the parameter only lists those states already in the database. Objective: To Familiarize ourselves with building reports with Data awareness and work with data.

  33. Demo – Product Profitability Report • Bring up Eclipse • Open the BIRT Perspective • In the Navigator View create a BIRT Report Project • In the Project create a BIRT Report • Add a data source to the Classic Models Sample database • Add a data set to list products, total costs, total profits • Add report items • Format report • Group items • Sort items • Add report parameters • Add data set parameters • Preview

  34. Lesson 2 – Charting in Reports

  35. Basic Concepts – Charting in Reports • Charts integrated with BIRT Report Designer • Charts can be used standalone as a library • Wide variety of chart types • Many formatting options • Charts are extensible to include more types

  36. Pie Charts 2D, 2D with depth Ratio, Explode slices, Min Slice 36

  37. Horizontal, Vertical 2D, 2D w/depth, 3D Stacked, Side-by-side Percent, Logarithmic Bar Charts 37

  38. Bar Charts 38

  39. Cones – Tubes – Pyramids 39

  40. Line Charts Horizontal, Vertical 2D, 3D Various types of markers Line styles, thicknesses Drawn as Line, Curve 40

  41. Stock Charts CandleStick / Bar Stick Horizontal, Vertical 2D Formatting control 41

  42. Scatter Charts Horizontal, Vertical 2D Various types of markers Line styles, thicknesses Drawn as Line, Curve 42

  43. Area Charts Horizontal, Vertical 2D, 2D w/depth, 3D Stacked, Side-by-side Percent, Logarithmic Drawn as Line, Curve 43

  44. Difference/Range Charts 2D. Curve or Straight lines. New Negative/Positive Fill also works for other types. 44

  45. Meter Charts 2D, formatting control Regions, Needle styles, thicknesses 45

  46. Gantt Charts 2D. Custom Bar width Custom Start/End Markers Data : Task ID / Start Date, End Date, Task Name 46

  47. Bubble Charts 2D Custom Bubble shape – Square, triangle, diamond, star, icon… 47

  48. Data Binding in Charts • Bind through Data Set • Bind through Report Element

  49. Interactivity in Charts • Can jump to anchor points • Drill Through to other Reports • Interactivity through Javascript

  50. Demo – Charting in Your Report Scenario: Mr. Ernie wants a report that is a simple listing of all products in the database, with the number of units in stock. Arrange the products for each Product Line and sorted the products in each product line in decreasing order of total inventory. Your boss would also like to only list those products with a minimum quantity in stock. Provide a report parameter to limit the output to those products with a quantity in stock greater than that specified in the report parameter. Add a Pie chart to this report to list products and their inventory.

More Related