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

Introducing Pentaho Reporting


As introduced, Pentaho Reporting is an easy-to-use, open source, lightweight suite of Java projects, built to let the report developer be able to create pixel-perfect reports of his/her data in PDF, Microsoft Excel, HTML, Text, RTF, XML, and CSV formats. These computer generated reports easily refine data from various sources into a human readable form, and can be accessed via an integrated web viewer, saved as files and sent by email to a predefined list of recipients. It is also possible to generate reports as part of a Pentaho Data Integration transformation, to distribute the generated files according to more complex business rules (http://community.pentaho.com/projects/reporting).

Note

Pentaho Data Integration transformations are used to describe the data flows in a process, such as reading from a source, transforming data, and loading it into a target location. You will learn more in Chapter 16Using Reports in Pentaho Data Integration.

As it renders such high performance, consuming, considerably low amount of memory, the report processing can tower from small footprint embedded scenarios to large-scale enterprise reporting scenarios. Pentaho Reporting integrates perfectly with the Business Analytics Platform and allows you to share reports with coworkers and peers.

Pentaho Reporting styling is flexible and it permits the report designer to choose the granularity at which they desire to manipulate the entire user interface, right down to the minute details like the font styling on individual characters. In addition to this, you can also add your own images and logos to these reports and select from the various layouts, charts, and tables the one that you wish to apply.

Introducing Pentaho Reporting tools

Pentaho Reporting can be defined as a suite of open source tools and can be described as being composed of the following: 

  • Report Designer: This is a desktop application providing a design, develop, and test environment to enable the knowledge worker to easily create simple as well as complex reports. The tool is designed to be used by experienced and power users, who are familiar with few technical concepts.
  • Reporting Engine: This engine is born as an evolution of the JFreeReport project, a free Java class library for creating reports. The library can be used in both client-side (Report Designer, for example) and server-side applications (web applications, for example).
  • Reporting SDK: This is a packaging of several resources (the engine, some documentation, and all the libraries required to embed the Pentaho Reporting Engine into your application), to be a valid support for all the developers, particularly, for all the Java developers.

In this book, we will look at the Report Designer and the Reporting SDK in detail, assuming they are the right tools for developers and report designers, to use the Reporting Engine in real life use cases.

Types of users and required knowledge

Pentaho Reporting is designed and developed to make life easier for report designers, with less limitations on flexibility and the ability to develop sophisticated and rich reports. For this reason, the Report Designer can be used by developers (not necessarily Java developers) but also by information technologists with a basic knowledge of databases and technical concepts.

For advanced development, especially using the Reporting SDK, technical skills on Java development are required, and you must be familiar with importing JARs into a project and be comfortable reading inline comments in code, to figure out advanced functionality on your own.

If you are an information technologist with a basic knowledge of databases and technical concepts, the chapters dedicated to the Report Designer and how to use reports in Pentaho Data Integration and Pentaho Business Analytics Platform, are the topics you might be interested in. If you are a Java developer, the chapters about the Reporting SDK could also be interesting to you.

Technological advantages

Pentaho Reporting offers the following unique functionalities, not found in competing embeddable solutions:

  • Requires a Java runtime environment, not necessarily a JDK. Even if you need a JDK installed on your development environment, you do not need a JDK to run an application that embeds the Pentaho Reporting Engine. Only a Java runtime environment is required.
  • Potentially backwards compatible. In theory, Pentaho Reporting can run use dated versions of the Java virtual machine. Pentaho highly suggests to use JRE 1.8.0, but it is possible to use the Reporting Engine in older JRE versions (few integrations would be required).
  • All Processing is done in memory. All the processing, calculations, and algorithms are designed and developed to run in memory only, without the use of temporary files, tables, or any sort of memory mass usage.
  • Low memory requirement. An application based on Pentaho Reporting can run with only 64 MB of memory, even though 128 MB would dramatically increase the report processing speed.
  • Dynamically library loading. Pentaho Reporting Engine is able to detect JAR libraries at runtime. By adding new JARs or removing the existing ones, you can expand the engine's capabilities or remove unnecessary libraries to reduce your application's memory and disk space usage.
  • Parameterization at runtime. All the report elements, and we can say the same for styling, functions, and queries, are completely customizable through parameters passed to the Reporting Engine at run time.
  • OpenFormula standard. OpenFormula is an open standard that will be introduced in the next chapters. You will be able to create your own custom formulas or customize the existing ones using a known standard.
  • Easy resource management. Thanks to the use of the OpenDocument Format (ODF), the Pentaho Reporting Engine can bundle all the requested resources, including the data source connection information, query, and even binary resources like images into a regular file, simplifying the resource management.

A business friendly open source license

One very attractive feature of Pentaho Reporting is its license. Pentaho Reporting is available for free under the GNU LGPL. This license, as shown in the following screenshot, allows other open source and proprietary projects to embed Pentaho Reporting without fear of large license fees or viral open source limitations. As an open source project, developers also have unprecedented access to the engine and to a large group of software developers within the Pentaho Reporting community. This community includes open discussion forums and Internet Relay Chat (IRC), along with commercial support and licensing, if required.