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

Table of contents and index elements


There are two special types of subreports not explained yet: table of contents and index. The table of content (TOC) feature allows you to generate a TOC based on the groups you have mapped inside the report or to specify the subreports you want included in your TOC. The index feature allows you to generate an index based on the fields (or groups) in your report. When the index is generated, it displays the instances and page numbers in which the field name appears.

Example of index

As an example, let's see how to include the index to an existing report, of course assuming the report is big, defined by a lot of pages (otherwise, the index doesn't make a lot of sense). The report used to add the index is a basic report, built on a JDBC data source with the following query:

SELECT
 "PUBLIC"."ORDERFACT"."ORDERDATE",
 "PUBLIC"."ORDERFACT"."ORDERNUMBER",
 "PUBLIC"."CUSTOMERS"."CUSTOMERNAME",
 "PUBLIC"."ORDERFACT"."TOTALPRICE"
FROM
 "PUBLIC"."CUSTOMERS" INNER...