Reader small image

You're reading from  Pentaho 8 Reporting for Java Developers

Product typeBook
Published inSep 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781788298995
Edition1st Edition
Languages
Tools
Right arrow
Authors (2):
Francesco Corti
Francesco Corti
author image
Francesco Corti

Francesco Corti is an enthusiastic consultant in software solutions and loves working in developer, sales, and customers teams. Proud of the role of a software engineer, he is often involved in pre-sales presentations, public speaking, and IT courses. Developing software, designing architectures, and defining solutions in ECM/BPM and BI are his favorite areas of interest. He has completed dozens of projects, from very small ones to more complex ones, in almost 20 years of experience. A product evangelist at Alfresco, Francesco represents the famous open source ECM in the developer community. In addition to helping developers adopt Alfresco technologies, he often helps Alfresco to improve the developer experience through talks, articles, blogging, user demonstrations, recorded demonstrations, or the creation of sample projects. He is the inventor and principal developer of Alflytics (previously named Alfresco Audit Analytics and Reporting), the main business intelligence solution over Alfresco ECM, entirely based on the Pentaho suite. He authored the Pentaho Reporting video course with more than 40 videos and courses on the Pentaho Reporting Designer and SDK. Francesco has specialty and principal experiences in enterprise content management solutions with Alfresco ECM and Hyland OnBase (he is an OnBase certified installer); business process management solutions with Activiti, JBPM, and Hyland OnBase; data capture solutions with Ephesoft, Hyland OnBase, and custom software; record management solutions with O'Neil software and custom software (using Alfresco ECM and Hyland OnBase); and portal and collaboration with Liferay and MS SharePoint.
Read more about Francesco Corti

View More author details
Right arrow

Chapter 4. Creating a Report with Report Designer

In the previous two chapters, you learned the basis of Report Designer and Reporting Software Developers Kit (SDK). Reporting Engine has been treated as part of the other two tools. In this chapter, you are going to use Pentaho Report Designer again, with the goal to better understand it and start becoming a real expert. With this chapter, starts a collection of six chapters entirely dedicated to the desktop reporting tool. Starting from here, you will see all the advanced features, with the goal of being able to develop the best reports for your manager and customers.

To get started, you will first learn how to develop a Pentaho report from scratch, not using the Report Design Wizard as you did in Chapter 2, Getting started with Report Designer. The manual creation of a Pentaho report will give you the opportunity to see in action, all the features (basic and advanced) of the Pentaho Report Designer. As usual, the description will be driven...

Creating a Pentaho report


As we discussed in Chapter 2Getting Started with Report Designer, the creation of a Pentaho report starting from a blank report is an alternative to using the Report Design Wizard. Neither of the two ways is better than the other. Each way has advantages and disadvantages, and you should mature your own idea after some practice.

The development starting from a blank report is suggested if you want to have full control over the details and behaviors. The development using the wizard is suggested if your goal is to develop a standard report, quite simple in terms of structure, and also simple in terms of layout and customizations.

Note

Let's underline again one best practice: some developers prefer to start modifying a report built with the wizard, instead of starting from scratch. In principle this is not bad, but what can be experienced is that you have less control over some details, especially in fine tuning of the layout or some unexpected behaviors in particular...

Customizing Pentaho reports


Now that a first version of the report is developed (and tested using the preview), it's time to think about a second iteration, with the goal of enriching it by adding complexity to the layout with new elements. Before starting this new task, let's duplicate the previous report with a different name.

Duplicating an existing report is really straightforward: copy the report_01.prpt file as report_02.prpt in the  my_reports folder. Once copied, open the report using the Pentaho Report Designer. Opening a report has been introduced in Chapter 1, Introduction to Pentaho Reporting with more details, but it can be easily done using the folder icon (

) in the toolbar of the Pentaho Report Designer or the upper menu in the File group (using the Open item).

Customizing the font

We can do a lot for our report to make it more appealing for the users, and sometimes a few basic changes can improve the quality of the final result. As an example of customization, we are going to...

Previewing Pentaho reports in different formats


Now that you have two brand new reports (report_01.prpt and report_02.prpt) developed starting from a blank page, let's see how to preview report_02.prpt in different formats. As you learnt in the introduction, Pentaho Reporting Engine is able to generate reports in several formats, independently from the development.

To preview a report choosing the format, click on the green arrow icon (

) visible in the toolbar. Once clicked, you will see a short menu appear with a list of possible formats. The following screenshot shows what the menu looks:

Choosing the Print Preview item is like choosing the default format; the default format is generated and downloaded locally. If you select the PDF format, you will see that the report is entirely generated and downloaded locally. If your client environment has a reader (or software) associated with the format, you will see that it will be opened and previewed. On other hand, if the format of your report...

Train yourself to learn faster


We have already mentioned that experience is the best teacher for a report developer. In this section, we shared some exercises you could develop by yourself, so you can try creating and customizing a Pentaho Report using Pentaho Report Designer.

If don't have Pentaho Report Designer already installed on your laptop, check Chapter 2, Getting Started with Report Designer, for a step-by-step description of how to install it. If one or more exercises appear too difficult, don't worry. In the next chapters, you will cover all the details of the development and you will become a real expert.

In the meantime, remember that the solutions to all the suggested exercises can be found in the https://github.com/fcorti/pentaho-8-reporting-for-java-developers repository, more precisely in the Chapter 04 - Creating a report with Report Designer/my_reports path.

  • Exercise 1: Starting from report_02.prpt, change the color of the orange bars to #77b3d4. As a suggestion, check the...

Summary


In this chapter, you have walked through an advanced use of Pentaho Report Designer, starting from a blank report and learning how to develop a Pentaho report from scratch, not using the Report Design Wizard. The manual creation of a Pentaho report gave you the opportunity to see in action all the features (basic and advanced) of the Pentaho Report Designer.

As experienced in the previous chapters, the description has been driven by practical examples and a step-by-step approach to the tasks. At the end of the chapter, you saw how to develop a very simple report with an easy layout (report_01.prpt), and a complex report with a nice header, footer, grouping of details, and also a chart (report_02.prpt). In the last (but not the least) topic, you were introduced to a preview of the reports in all the available formats, with some highlights on the relation between the development and the final format.

This chapter is again written as a tutorial for developers and information technologists...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Pentaho 8 Reporting for Java Developers
Published in: Sep 2017Publisher: PacktISBN-13: 9781788298995
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Francesco Corti

Francesco Corti is an enthusiastic consultant in software solutions and loves working in developer, sales, and customers teams. Proud of the role of a software engineer, he is often involved in pre-sales presentations, public speaking, and IT courses. Developing software, designing architectures, and defining solutions in ECM/BPM and BI are his favorite areas of interest. He has completed dozens of projects, from very small ones to more complex ones, in almost 20 years of experience. A product evangelist at Alfresco, Francesco represents the famous open source ECM in the developer community. In addition to helping developers adopt Alfresco technologies, he often helps Alfresco to improve the developer experience through talks, articles, blogging, user demonstrations, recorded demonstrations, or the creation of sample projects. He is the inventor and principal developer of Alflytics (previously named Alfresco Audit Analytics and Reporting), the main business intelligence solution over Alfresco ECM, entirely based on the Pentaho suite. He authored the Pentaho Reporting video course with more than 40 videos and courses on the Pentaho Reporting Designer and SDK. Francesco has specialty and principal experiences in enterprise content management solutions with Alfresco ECM and Hyland OnBase (he is an OnBase certified installer); business process management solutions with Activiti, JBPM, and Hyland OnBase; data capture solutions with Ephesoft, Hyland OnBase, and custom software; record management solutions with O'Neil software and custom software (using Alfresco ECM and Hyland OnBase); and portal and collaboration with Liferay and MS SharePoint.
Read more about Francesco Corti