Book Image

Pentaho Reporting 3.5 for Java Developers

Book Image

Pentaho Reporting 3.5 for Java Developers

Overview of this book

Pentaho Reporting lets you create, generate, and distribute rich and sophisticated report content from different data sources. Knowing how to use it quickly and efficiently gives you the edge in producing reports from your database. If you have been looking for a book that has plenty of easy-to-understand instructions and also contains lots of examples and screenshots, this is where your search ends. This book shows you how to replace or build your enterprise reporting solution from scratch with Pentaho's Reporting Suite. Through detailed examples, it dives deeply into all aspects of Pentaho's reporting functionalities, providing you with the knowledge you need to master report creation. This book starts off with a number of examples to get you familiar with the tools and technology of the Pentaho Reporting Suite. Then, with additional examples, it goes into advanced subjects such as charting, sub-reporting, cross tabs, as well as API generation of reports. There are also details and examples on extending Pentaho's open source reporting engine. The reader will learn the ins and outs of Pentaho Report Designer, including a cheat sheet with all the available short-cut keys, to make report design efficient and painless. Embedding reports into your Java application can be difficult. With Pentaho Reporting it's just a few lines of code. The book provides examples of how to embed reporting into your J2EE and client Java applications, as well as showing you how to build dynamic reports from scratch using Pentaho Reporting's simple Java Bean-based report generation API. Setting up and integrating a reporting server in an enterprise environment can be arduous. In addition to learning how to build great embeddable reports, you'll also learn how to combine Pentaho Reporting with Pentaho's BI Server for a zero-code, easy-to-configure, enterprise reporting solution.
Table of Contents (19 chapters)
Pentaho Reporting 3.5 for Java Developers
Credits
Foreword
About the Author
About the Reviewers
Preface
Index

Preface

Pentaho Reporting lets you create, generate, and distribute rich and sophisticated report content from different data sources. Knowing how to use it quickly and efficiently gives you the edge in producing reports from your database. If you have been looking for a book that has plenty of easy-to-understand instructions and also contains lots of examples and screenshots, this is where your search ends.

This book shows you how to replace or build your enterprise reporting solution from scratch with Pentaho's Reporting Suite. Through detailed examples, it dives deeply into all aspects of Pentaho's reporting functionalities, providing you with the knowledge you need to master report creation.

What this book covers

Chapter 1An Introduction to Pentaho Reporting provides a quick overview of Pentaho Reporting, including a feature summary and architectural summary, as well as a history of the product.

Chapter 2Pentaho Reporting Client and Enterprise Examples tells how to install and create reports, and how to embed reports in your J2EE and client Java applications.

Chapter 3Pentaho Reporting Examples in the Real World tells how to connect to a JDBC data source and create realistic inventory, balance, and invoice reports, including charts and sub-reports.

Chapter 4Design and Layout in Pentaho's Report Designer takes a deep dive into Pentaho's Report Designer, learning how to create great-looking reports.

Chapter 5Working with Data Sources teaches the various ways to connect your report to live data, including JDBC, Hibernate, Java Beans, OLAP, and many other data sources.

Chapter 6Including Charts and Graphics in Reports is about incorporating Pie, Bar, Line, and many other chart types in your reports, as well as including dynamic images in your report.

Chapter 7Parameterization, Functions, Formulas, and Internationalization in Reports defines parameters for dynamic report generation. It helps you write formulas and use available functions for rich summary and calculated values in your reports, along with dynamically adjusting colors and styles using expressions in your report.

Chapter 8Adding Sub-Reports and Cross Tabs to Reports gives an overview of how to build reports that include side-by-side sub-reports and cross tabs.

Chapter 9Building Interactive Reports teaches how to add dynamic interaction to HTML and Swing reports, for immediate feedback and dashboard-like functionality.

Chapter 10API-based Report Generation is about building reports from XML and by using Pentaho Reporting's Java Bean API.

Chapter 11Extending Pentaho Reporting teaches how to write custom functions and elements within Pentaho Reporting.

Chapter 12Additional Pentaho Reporting Topics discovers how to use Pentaho Reporting with the Pentaho BI Server, including Pentaho Metadata. It aids in learning more about Pentaho Reporting's open source approach, and how you can contribute to the free software movement.

Who this book is for

This book is primarily written for Java developers who want to assemble custom reporting solutions with Pentaho Reporting. Their main interest is in the technical details of creating reports. They want to see how to solve common report problems with a minimum of fuss and don't need an overview of BI or the importance of reporting.

Secondary audiences of this book are information technologists who need to install a reporting solution in their environment, and want to learn advanced concepts within Pentaho Reporting such as sub-reports, cross tabs, data source configuration, and metadata-based reporting.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Copy the servlet file chapter2\src\Chapter2Servlet.java to chapter3\src\Chapter3Servlet.java, and rename the class to Chapter3Servlet."

A block of code will be set as follows:

String reportName = request.getParameter("reportName");
if (reportName == null) {
	response.getWriter().println("No report parameter specified");
	return;
}

Any command-line input or output is written as follows:

ant restart_tomcat

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "Right-click on the sub-report element in the canvas and select Edit SubReport".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to , and mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code for the book

Visit http://www.packtpub.com/files/code/3193_Code.zip to directly download the example code.

Note

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration, and help us to improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.