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

Pentaho Reporting architecture


Pentaho Reporting Engine is mainly a Java class library, broken up into other Java projects, which are then combined to render reports. The library is optimized for performance and a small memory footprint, and can run completely in memory without generating temporary files or requiring extra compilation steps. The source code is available, under the terms of the GNU LGPL Version 2.1, in the GitHub repository https://github.com/pentaho/pentaho-reporting.

The GitHub repository includes the Pentaho Report Designer, providing a graphical editor for report definitions and used as a standalone desktop reporting tool. In addition, there are also other related open source tools and projects in the Pentaho Reporting landscape, including the Report Engine Demo, Report Design Wizard, Report Designer, and the web-based ad hoc reporting user interface.

The following is an introduction of the Java project defining the Pentaho Reporting Engine, with a focus on the libraries, the Reporting Engine core, and the Reporting Engine extensions.

Reporting Engine's libraries

The Pentaho Reporting Engine uses the following libraries to render reports:

  • Flute: This is a CSS 2 parser written in Java that implements SAC (https://www.w3.org/Style/CSS/SAC/). SAC is a standard event-based API for CSS parsers, closely modeled on the SAX API for XML parsers.
  • LibBase: This is the root library for all other Pentaho Reporting libraries. This library contains common capabilities, such as debug and error logging utilities, library configuration, along with library initialization APIs, for consistent startup and shutdown management of the Reporting Engine.
  • LibDocBundle: This abstracts the management of Pentaho Reporting file bundles, which are by default stored as ZIP files, and implements the ODF. This makes it simpler for other parts of the Reporting Engine to work with and manipulate Pentaho Reporting's file formats.
  • LibFonts: This allows Pentaho Reporting to work with TrueType system fonts, extracting the necessary metadata from font types and populating an abstract interface to allow appropriate rendering in various contexts, including PDF and Excel views.
  • LibFormat: This is a string formatting library, which can render dates and numbers appropriately, based on format strings. This library is focused on memory and CPU efficiency for high performance report rendering.
  • LibFormula: This is a formula parsing and execution library based on the OpenFormula standard. You can learn more about OpenFormula by visiting http://wiki.oasis-open.org/office/About_OpenFormula. This library is similar in function to Excel-based formula definitions. LibFormula is a very general library and is used outside Pentaho Reporting in other projects that require OpenFormula style parsing and execution. LibFormula-UI is a formula editor for OpenFormula expressions based on LibFormula.
  • LibLoader: This manages the loading and caching of all necessary resources required for generating reports in a generic way, providing a simple API for other parts of the Reporting Engine that control static and dynamic content, including data sources and images.
  • LibPensol: This is an access layer for accessing a remote Pentaho solution repository via an Apache VFS filesystem. It handles all HTTP calls, the parsing of the XML file, and all client-side state managements.
  • LibPixie: This is a WMF-file reading library, originally written by David R. Harris as converter for the Pixie-image viewer. Pixie was long time dead and has now been resurrected as WMF-reader and image producer for Java 1.2.2 or higher. Pixie lacks the support for most bitmap-formats, but everything else works fine.
  • LibRepository: This abstracts the input and output of hierarchical storage systems, such as file systems, that Pentaho Reporting interacts with. This makes it possible for a custom storage system, such as FTP, to be implemented and to be mapped to the API, giving Pentaho Reporting access to the system.
  • LibSerializer: This provides helper methods for serializing non-serializable objects. This is necessary so that the Reporting Engine can serialize standard Java classes that don't implement Java's serializable interface.
  • LibSparkline: This is a library developed to render sparkline graphs. Sparklines are small-scale bar or line charts that are inserted into text to provide visualized information along with the textual description.
  • LibSwing: This is a common helper class storage for design-time elements, so that they don't have to move into the engine project, where they potentially bloat up the project due to third-party dependencies or a large amount of code.
  • LibXml: This provides utility classes for Simple API for XML (SAX) parsing and XML writing, based on Java's Java API for XML Parsing (JAXP) API. This library assures the speedy loading and validation of Pentaho Reporting XML template files.

Reporting Engine core

The Reporting Engine core project contains the main reporting algorithm for rendering reports, along with the necessary functionality to support styling. This project also contains the algorithms for rendering specific outputs, including PDF, Excel, CSV, XML, and more. The engine relies on the already mentioned libraries for managing the loading, parsing, formatting, rendering, and archiving of generated reports.

Reporting Engine extensions

The Reporting Engine extensions project contains third-party extensions to the Reporting Engine, which are very useful, but increase dependencies. Extensions in this project include JavaScript expression support using the Rhino project, a hibernate data source factory, bar code support using Barbecue, sparkline support using the LibSparkline, along with additional JDK 1.4 support for configuration and printing. Additional extension projects exist that include charting and many of the data sources discussed in this book.

Note

The following are some links to the quoted projects for further details: Rhino: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino Hibernate: http://hibernate.org Barbeque: http://barbecue.sourceforge.net

Previous PageNext Page
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