Book Image

Pentaho 8 Reporting for Java Developers

By : Jasmine Kaur, Francesco Corti
Book Image

Pentaho 8 Reporting for Java Developers

By: Jasmine Kaur, Francesco Corti

Overview of this book

This hands-on tutorial, filled with exercises and examples, introduces the reader to a variety of concepts within Pentaho Reporting. With screenshots that show you how reports look at design time as well as how they should look when rendered as PDF, Excel, HTML, Text, Rich-Text-File, XML, and CSV, this book also contains complete example source code that you can copy and paste into your environment to get up-and-running quickly. Updated to cover the features of Pentaho 8, this book will teach you everything you need to know to build fast, efficient reports using Pentaho. If your interest lies in the technical details of creating reports and you want to see how to solve common reporting problems with a minimum of fuss, this is the book for you.
Table of Contents (25 chapters)
Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Dedication
Preface

Cross tab using Java


In Chapter 10, Subreports and Cross Tabs, you learnt all about cross tabulation (or cross tab), allowing you to view dimensional data in a Pentaho report. In this section in particular, you will reach the same level of expertise from a Java perspective. In the following sections, you will go through the basics of Pentaho cross tab and then you will move on to understand a fully working example of source code, available in the GitHub repository.

Cross tabs using Java

To understand the development of cross tab using Java, let's introduce the various components used for its definition. First is the CrosstabGroup class, used to declare and manage cross tab instances in MasterReport. Differently from a regular element, a cross tab is added to a report using the addRootGroup(CrosstabGroup crosstabGroup) method.

As you saw in Chapter 10, Subreports and Cross Tabs, cross tabs can use an MDX query or a more traditional SQL query with an MDX-like structure. In every case, the composition...