Pentaho 8 Reporting for Java Developers

Book description

Create reports and solve common report problems with minimal fuss.

About This Book

  • Use this unique book to master the basics and advanced features of Pentaho 8 Reporting.
  • A book showing developers and analysts with IT skills how to create and use the best possible reports using the Pentaho platform.
  • Written with a very practical approach: full of tutorials and practical examples (source code included).

Who This Book Is For

This book is written for two types of professionals and students: Information Technologists with a basic knowledge of Databases and Java Developers with medium seniority. Developers will be interested to discover how to embed reports in a third-party Java application.

What You Will Learn

  • The basics of Pentaho Reporting (Designer and SDK) and its initial setup.
  • Develop the most attractive reports on top of a wide range of data sources.
  • Perform detailed customization of layout, parameterization, internationalization, behaviors, and more for your custom reports developed with Pentaho Reporting.
  • Integrate Pentaho reports into third-party Java application with full control over interactions, layout, and behavior in general.
  • Use Pentaho reports in the other components of the Pentaho Suite (BA Platform and PDI).

In Detail

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.

Style and approach

A step-by-step guide covering technical topics relating to environments, best practices, and source code, to enable the reader to assemble the best reports and use them in existing Java applications.

Table of contents

  1. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Reader feedback
    6. Customer support
      1. Downloading the example code
      2. Downloading the color images of this book
      3. Errata
      4. Piracy
      5. Questions
  2. Introduction to Pentaho Reporting
    1. Introducing Pentaho Reporting
      1. Introducing Pentaho Reporting tools
      2. Types of users and required knowledge
      3. Technological advantages
      4. A business friendly open source license
    2. Typical uses of Pentaho Reporting
      1. Operational reporting
      2. Business intelligence reporting
      3. Financial reporting
      4. Production reporting
    3. Pentaho Reporting history
    4. Feature overview
      1. An advanced reporting algorithm
      2. A multitude of available data sources
      3. A wide variety of output formats
      4. Pixel accurate rich formatting
      5. Embedded charts
      6. Report parameterization
      7. Formulas and style expressions
      8. Subreports
      9. Cross tab reports
      10. Interactive reporting
      11. Rich authoring tools
      12. Reporting server
      13. Java API for building reports
      14. Extensibility
      15. Pentaho reporting website
    5. Pentaho Reporting architecture
      1. Reporting Engine's libraries
      2. Reporting Engine core
      3. Reporting Engine extensions
    6. Summary
  3. Getting Started with Report Designer
    1. Prerequisites of your environment
    2. Setting up the Pentaho Report Designer
      1. The SamplaData schema
    3. Introduction to the user interface
      1. Menu and toolbar
      2. Report element palette
      3. Report canvas tab
      4. Report explorer
      5. Element properties
      6. Messages
    4. Creating your first report using the wizard
      1. Introducing the Report Design Wizard
        1. Defining the look and feel
        2. Defining the data source and query
        3. Defining the layout
        4. Formatting the fields
    5. Previewing the report
    6. Saving and opening the report
    7. Summary
  4. Getting Started with Reporting SDK
    1. Obtaining the Pentaho Reporting SDK
      1. Anatomy of the Pentaho Reporting SDK
      2. Using the included Eclipse project
      3. Introducing the included examples
    2. Creating a web application using Pentaho Reporting and Maven
      1. Prerequisites of your environment
      2. Creating a web application in Java
        1. Creating a Java web application using Apache Maven
        2. Creating the first page of the Java web application
      3. Including Pentaho Reporting Engine in a web application
        1. Adding the Pentaho repository
        2. Adding the Pentaho dependencies
      4. Showing an existing Pentaho report in a web application
        1. Including an existing Pentaho report
        2. Including the SampleData schema
        3. Updating the PentahoServlet
        4. Previewing the Pentaho report
    3. Summary
  5. Creating a Report with Report Designer
    1. Creating a Pentaho report
      1. Creating a new Pentaho report
      2. Creating a datasource in Pentaho reports
      3. Adding details to Pentaho reports
      4. Previewing and saving a Pentaho report
    2. Customizing Pentaho reports
      1. Customizing the font
      2. Customizing the report header
      3. Adding the details header and customizing the details
      4. Customizing the page footer
      5. Grouping the details
      6. Adding charts
    3. Previewing Pentaho reports in different formats
    4. Train yourself to learn faster
    5. Summary
  6. Design and Layout in Report Designer
    1. Report Designer user interface components
      1. The Structure tab in report explorer
      2. The report element properties
    2. Master report and report bands properties
      1. Common properties
        1. Size and position properties
        2. Font, text, and text-spacing properties
          1. Font properties
          2. Text properties
          3. Text-spacing properties
        3. Object properties
        4. Links properties
        5. Excel properties
        6. Page-behaviour properties
        7. Padding properties
        8. Border properties
        9. Common properties in attributes
        10. Query-metadata properties
        11. Wizard properties
        12. HTML properties
        13. Excel properties in attributes
        14. HTML-events, PDF-events, and Swing-events properties
          1. HTML-events properties
          2. Pdf-events properties
          3. Swing-events properties
      2. Master Report properties
        1. Size and position properties
        2. Text properties
        3. Page-behaviour properties
        4. Query properties
        5. Common properties in the attributes tab
        6. Wizard properties
        7. Excel properties
        8. Advanced properties
        9. Pentaho properties
      3. Page Header and Page Footer properties
      4. Report Header and Report Footer properties
      5. Group Header and Group Footer properties
      6. Details body properties
      7. Watermark properties
    3. Report elements
      1. Common properties
        1. Size and position properties
        2. Font properties
        3. Text and text-spacing properties
        4. Rotation properties
        5. Object properties
        6. Links properties
        7. Excel properties
        8. Page-behavior properties
        9. Padding and border properties
        10. Common properties in attributes
        11. Query-metadata properties
        12. Wizard properties
        13. HTML properties
        14. Excel properties in attributes
        15. HTML-event, pdf-events, Swing-events properties
      2. Label and message
      3. Fields and resources
      4. Image and image-field
      5. Vertical-line, horizontal-line, rectangle, and eclipse
      6. Survey-scale
      7. Chart
      8. Simple-barcodes
      9. Bar-sparkline, line-sparkline, and pie-sparkline
      10. Band
      11. Sub-report
      12. Table-of-content and index
    4. Hiding and showing bands
    5. Visual layout in Report Designer
      1. The grid
      2. Guide lines
      3. Additional visual indicators
      4. Moving and aligning single elements
      5. Aligning groups of elements
      6. Miscellaneous layout capabilities
    6. Pentaho Report Designer shortcut keys
    7. Considerations for different output formats
      1. Cell output
      2. Paging
      3. Limits to rich graphics and charts
    8. Summary
  7. Configuring JDBC and Other Data Sources
    1. Introducing data sources
      1. Datasets in report explorer
    2. The JDBC data source
      1. Adding or editing a JDBC connection
        1. About the JNDI access
      2. Adding or editing a query
    3. The metadata data source
    4. The MongoDB data source
    5. The Pentaho Data Integration data source
    6. The OLAP data source
      1. Pentaho analysis
      2. OLAP4J
      3. Pentaho analysis - custom
    7. The XML data source
    8. The table data source
    9. The advanced data source
      1. Scriptable
      2. External
      3. Sequence generator
      4. OpenERP data access
    10. The Pentaho community data access data source
    11. Summary
  8. Including Graphics and Charts in Reports
    1. Including static images in reports
    2. Including dynamic images in reports
    3. Including charts in reports
      1. Types of datasets
        1. Category dataset
          1. Common properties
          2. Series properties
          3. Group properties
          4. Optional properties
        2. Pie dataset
        3. XY series and XYZ series dataset
        4. Time series dataset
        5. Thermometer dataset
      2. Style and layout common properties
        1. Required properties
        2. Title properties
        3. General properties
        4. Legend properties
        5. Scripting properties
      3. Bar chart
        1. Bar chart example
      4. Line chart
        1. Line chart example
      5. Area chart
        1. Area chart example
      6. Pie chart
        1. Pie chart example
      7. Multipie chart
        1. Multipie chart example
      8. Bar line chart
        1. Bar line chart example
      9. Ring chart
        1. Ring chart example
      10. Bubble chart
        1. Bubble chart example
      11. Scatter plot chart
        1. Scatter plot chart example
      12. XY bar chart, XY line chart, and XY area chart
        1. XY bar chart, XY line chart, and XY area chart examples
      13. Extended XY line chart
        1. Extended XY line chart example
      14. Waterfall chart
        1. Waterfall chart example
      15. Radar chart
        1. Radar chart example
      16. XY area line chart
      17. Thermometer chart
        1. Thermometer chart example
    4. Including sparkline charts in reports
    5. Summary
  9. Parameterization, Functions, Variables, and Formulas
    1. Report parameterization
      1. Using report parameters
      2. The available report parameter types
      3. Creating parameters
      4. Creating a report using parameters
    2. Functions and expressions
      1. Functions and expressions in Report Designer
      2. Creating and using functions
        1. Example of function
      3. Creating and using expressions
        1. Example of expression
      4. The available function types
        1. Common functions
        2. Report functions
        3. Summary functions
        4. Running functions
        5. Advanced functions
        6. Chart data and value data functions
        7. Image functions
        8. Script functions
        9. Table of contents functions
    3. Environment variables
    4. Working with formulas
      1. Creating a formula
      2. The formula syntax
      3. Formula datatypes
      4. Formula operators
      5. The available formula categories
        1. Date or time formulas
        2. Database formulas
        3. Information formulas
        4. Logical formulas
        5. Mathematical formulas
        6. Rounding formulas
        7. Text formulas
        8. User-defined formulas
    5. Summary
  10. Internationalization and Localization
    1. Internationalization and localization
    2. Using resources to localize elements
    3. Resources for localization
      1. Managing resource bundles
    4. Testing the localization
    5. An example of report localization
    6. Summary
  11. Subreports and Cross Tabs
    1. Subreports in Pentaho Report Designer
      1. Subreport example
      2. Other subreport examples
    2. Table of contents and index elements
      1. Example of index
    3. Cross tabs in Pentaho Report Designer
      1. Cross tab examples
    4. Summary
  12. The PRPT Format and the Java API to Build It
    1. Understanding the serialized report format
      1. Anatomy of a .prpt bundle file
      2. The datadefintion.xml file and datasources folder
        1. Parameters
        2. Data source reference
        3. Functions and expressions
        4. Datasources folder
      3. layout.xml file
        1. Group and detail band hierarchy
        2. Report elements
      4. settings.xml file
      5. styles.xml file
      6. Manual creation of a .prpt bundle file
    2. Building a report using Pentaho Reporting Java API
      1. Adding a data source
      2. Defining parameters
      3. Including functions and expressions
      4. Defining the report layout
        1. Common report bands
        2. Group band hierarchy
      5. Adding elements to the report
        1. Adding a label element
        2. Adding a chart element
      6. Developing an example of Pentaho report
    3. Summary
  13. Developing Using Data Sources
    1. Pentaho Reporting Engine Data API
      1. The DataFactory interface
      2. The TableModel interface
      3. DataFactory serialization
      4. Additional data source metadata
      5. Accessing data throughout a report
    2. Existing DataFactory implementations
      1. TableDataFactory
        1. TableDataFactory example
      2. SQLReportDataFactory
        1. StaticConnectionProvider
        2. DriverConnectionProvider
        3. JndiConnectionProvider
        4. Using SQLReportDataFactory
        5. SQLReportDataFactory example
      3. XPathDataFactory
        1. XPathDataFactory example
      4. HQLDataFactory
        1. StaticSessionProvider
        2. DefaultSessionProvider
      5. PmdDataFactory
        1. XMI file
        2. Domain Id
        3. IPmdConnectionProvider
        4. PmdDataFactory example
      6. KettleDataFactory
        1. KettleDataFactory example
      7. BandedMDXDataFactory and DenormalizedMDXDataFactory
        1. BandedMDXDataFactory
        2. DenormalizedMDXDataFactory
        3. BandedMDXDataFactory example
      8. CompoundDataFactory
      9. ScriptableDataFactory
    3. Summary
  14. Internationalization, Subreports, and Cross Tabs Using Java
    1. Internationalization and localization using Java
      1. Resources for localization using Java
      2. Testing the localization using Java
      3. An example of report localization using Java
    2. Subreports using Java
      1. Subreports using Java
      2. An example of subreport using Java
    3. Cross tab using Java
      1. Cross tabs using Java
      2. An example of cross tab using Java
    4. Summary
  15. Building Interactive Reports
    1. Interactive reports in HTML
      1. Manipulating the reporting HTML DOM
      2. Including an external CSS or JavaScript resource
    2. Example of interactive reports using Java
      1. Opening a static URL from a Pentaho report
      2. Opening a dynamic URL from a Pentaho report
      3. Manipulating the content of a Pentaho report
      4. Example of master/details report interaction
    3. Summary
  16. Using Reports in Pentaho Business Analytics Platform
    1. Introducing Pentaho Business Analytics Platform
      1. Installing the Business Analytics Platform
      2. Basics of the Business Analytics Platform
    2. Publishing a report in the Business Analytics Platform
      1. Manually uploading a report
      2. Publishing a report using the Pentaho Report Designer
      3. Managing data sources
    3. Previewing a report
      1. Previewing a report from the browse files page
      2. Previewing a report using a direct link
      3. The bundled report preview
    4. Managing permits and schedule
    5. Creating a dashboard with Pentaho reports
      1. Community dashboard editor basics
      2. Introduction of the report components
        1.  PRPT Component
        2. Execute Prpt Component
        3. Schedule PRPT Component
      3. Example of CDE dashboard
    6. Summary
  17. Using Reports in Pentaho Data Integration
    1. Introducing Pentaho Data Integration
      1. Installing Pentaho Data Integration
      2. Basics of Pentaho Data Integration
        1. Jobs and transformations
        2. Steps and entries
        3. Database connections
        4. Storage and reuse
    2. Introduction of Spoon client
    3. The Pentaho Reporting output step
    4. Introducing Pan and Kitchen
    5. Creating a transformation with Pentaho reports
      1. Executing the transformation using Pan
    6. Summary
  18. Pentaho Reporting Nightly Build and Support
    1. Pentaho Report Designer nightly build
      1. Prerequisites for building the project
      2. Cloning the GitHub repository
      3. Building the release
      4. Installing and running the nightly build
    2. Pentaho Reporting SDK nightly build
      1. Updating the pom.xml file
      2. Adding the nightly build libraries
      3. Compiling and running the project
    3. Getting help from the community
      1. Asking questions and helping others
      2. Online documentation
      3. Submitting bugs and viewing backlogs
      4. Contributing code
      5. Enterprise support
    4. What to do once you become an expert
    5. Summary

Product information

  • Title: Pentaho 8 Reporting for Java Developers
  • Author(s): Francesco Corti
  • Release date: September 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781788298995