Book Image

BIRT 2.6 Data Analysis and Reporting

By : John Ward
Book Image

BIRT 2.6 Data Analysis and Reporting

By: John Ward

Overview of this book

BIRT is an Eclipse-based open source reporting system for web applications based on Java and Java EE. To address a wide range of reporting needs within a typical application, ranging from operational or enterprise reporting to multi-dimensional online analytical processing (OLAP), you need to know BIRT from head to toe. If you wish to start making reports easily and quickly, and also want to be up-to-date with the latest developments in BIRT, then this book is for you. It will guide you from scratch to develop reports using the Eclipse BIRT project. You will learn how to connect to data, use report items to display and format data, and use scripting to build advanced reports and charts.The book steers you through each step of report setup, to creating, designing, formatting, and deploying reports with data from a wide range of data sources. Its focus is on familiarizing you with the most visible and familiar product built with the BIRT framework – the BIRT Report Designer. It starts by introducing the concepts of business intelligence and open source software, and different installation methods. It will introduce you to the various visual report elements that can be used to design BIRT reports, such as the Palette and Grid components. You will learn the details of the data components of BIRT (the Data Source and the Data Set), different types of source data that BIRT supports such as XML files, flat text files, and databases, and the creation of all of the elements while connecting to Data Sources in reports and Report Projects. By the end of the book, you will be able to enhance the presentation of your report using Charts, Hyperlinks, and Drill Through. You will also be able to take advantage of the scripting capabilities that BIRT has to offer with Expressions and Event Handlers and successfully deploy BIRT reports.The book includes a case study at the end along with a real-world example that runs throughout the book.
Table of Contents (15 chapters)
BIRT 2.6 Data Analysis and Reporting
Credits
About the Author
About the Reviewers
Preface

Pie chart


In the following exercise, we are going to look at how to build a pie chart. A pie chart is a very common report type used in business to display percentages. In this example, we will create a pie chart to show what percentage an employee contributed to the total amount of sales. This will give us a visual representation of who the top employees are in terms of sales.

  1. 1. Create a new report titled Employee_Sales_Percentage.rptDesign.

  2. 2. From the ClassicCarsLibrary.rptDesign library, add the dsClassicCars data source to the report.

  3. 3. Create a new dataset called totalSales using the following query:

    select CLASSICMODELS.EMPLOYEES.EMPLOYEENUMBER,
    CLASSICMODELS.EMPLOYEES.LASTNAME || ', ' || CLASSICMODELS.EMPLOYEES.FIRSTNAME name,
    sum(CLASSICMODELS.ORDERDETAILS.PRICEEACH) sales
    from
    CLASSICMODELS.EMPLOYEES,
    CLASSICMODELS.ORDERS,
    CLASSICMODELS.ORDERDETAILS,
    CLASSICMODELS.CUSTOMERS
    where
    CLASSICMODELS.CUSTOMERS.SALESREPEMPLOYEENUMBER = CLASSICMODELS.EMPLOYEES.EMPLOYEENUMBER
    and CLASSICMODELS...