Trying out stylesheets

To try out the stylesheets we just created, run them through PRD, whose default user is Designer, and from the Pentaho BA Server, logging in with the user Admin.

Then, on one hand, preview the report in PRD.

On the other hand, publish the report in Pentaho BA Server, in the same folder where we published previous reports. When asked if you want to execute the report now, click on the Yes option.

Trying out stylesheets

In the following screenshot we have placed the results of the two executions of the report side by side for comparison. On the left is the report executed in Pentaho BA Server, and on the right is the report executed in PRD:

Trying out stylesheets

If we review the CSS rules that we have defined, we can see that we have done an important job using environment variables and stylesheets.

Next, we will talk about another new feature in Pentaho Report Designer: Crosstabs!

Learning about crosstabs

A crosstab is a table where we can analyze and compare the relationship of the results of two or more study variables. Its name comes from the fact that a cross is carried out between the values of the study variables in order to analyze something. That is, in a crosstab we can have years and months on one side and film ratings on the other, and analyze their intersection, the quantity of films of each rating rented in each month and year. Crosstab is similar to Excel pivot tables.

Crosstabs are used in OLAP analysis, where the user can place study variables at the head of a row or column.

Note

For more information on crosstabs, you can visit Wikipedia:

http://en.wikipedia.org/wiki/Crosstab

The crosstabs in PRD

Before we begin, we would like to quote a nice introduction by Thomas Morgner (the software architect for Pentaho Report Designer) regarding crosstabs:

Crosstabs have been on the horizon for several years now. They lived a happy, undisturbed life along with the unicorns and gnomes guarding the pot of gold at the end of the rainbow.

With an endless recession and central banks selling off their gold reserves, the unicorn has been sold to a meat factory and the gnomes now assemble luxury cell-phones in a Chinese factory.

So the day had to come that crosstabs have to work for a living. That day is now.

Crosstabs themselves are nothing new. They have been in development for many years. They could even be included in PRD 3.5, although in an experimental and complex manner.

With crosstabs, we can include in our reports the analytic capacity that OLAP analysis offers, although in a predefined and totally static way.

Using crosstabs

To create a crosstab in PRD, drag-and-drop the Using crosstabs object in the desired section.

Note

We will see that the way crosstabs are implemented is very similar to Subreports.

After doing this, the UI will ask us if we want our crosstab to be Banded or Inline. Next we choose or create the data set we want to use. Finally, the Crosstabs Editor window will open, as shown in the following screenshot, which we will use to configure the data to be displayed.

Using crosstabs
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset