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