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

Wizard Java API


In addition to building reports via Pentaho Reporting's traditional API, it is also possible to build a report using Pentaho's Wizard API. This API is defined in the wizard-core library, within the org.pentaho.reporting.engine.classic.wizard package and sub-packages. The DefaultWizardSpecification class, defined in the model package, allows you to quickly populate a report with groupings and details. The Wizard API may incorporate predefined styles, allowing your organization to easily generate dynamic reports that fit your company's style requirements.

Once a WizardSpecification is defined, you can easily populate a report with just two lines of code:

WizardProcessorUtil.applyWizardSpec(styledReport, wizardSpec);
WizardProcessorUtil.ensureWizardProcessorIsAdded(styledReport, null);

The applyWizardSpec inserts the wizardSpec into the styledReport, and the ensureWizardProcessorIsAdded method adds a WizardProcessor as a ReportPreProcessor to the styledReport, by calling the...