PentahoAbout the TutorialPentaho Reporting is a suite (collection of tools) for creating relational and analyticalreports. It can be used to transform data into meaningful information. Pentaho allowsgenerating reports in HTML, Excel, PDF, Text, CSV, and xml.This tutorial provides a basic understanding of how to generate professional reports usingPentaho Report Designer.AudienceThis tutorial is designed for all those readers who want to create, read, write, and modifyDynamic Reports using Java. In addition, it will also be quite useful for those readers whowould like to become a Data Analyst.PrerequisitesBefore you start proceeding with this tutorial, we assume that you have prior exposure toCore Java, Database Concepts, and SQL Queries.Copyright & Disclaimer Copyright 2014 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I)Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republishany contents or a part of contents of this e-book in any manner without written consentof the publisher.We strive to update the contents of our website and tutorials as timely and as precisely aspossible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of ourwebsite or its contents including this tutorial. If you discover any errors on our website orin this tutorial, please notify us at [email protected]

PentahoTable of ContentsAbout the Tutorial . iAudience . iPrerequisites . iCopyright & Disclaimer . iTable of Contents . ii1.PENTAHO – OVERVIEW . 1What is Pentaho Reporting?. 1Features of Pentaho . 12.PENTAHO – INSTALLATION . 2Prerequisites . 2Download Pentaho Reporting . 2Install Pentaho Reporting . 3Install Database Driver . 4Install Additional Fonts . 43.PENTAHO – NAVIGATION . 5The Welcome Screen . 5The Main Toolbar . 5The Report Workspace . 6The Structure Pane . 7The Data Pane . 7The Style Pane . 8The Attribute Pane . 9The Palette . 9ii

Pentaho4.PENTAHO – DATA SOURCES AND QUERIES . 12Steps to Generate a Report using Pentaho . 135.PENTAHO – REPORTING ELEMENTS . 20Adding Reporting Elements . 206.PENTAHO – PAGE FOOTER FIELDS . 23Adding Page Footer Fields in Pentaho . 237.PENTAHO – GROUPS . 27Adding Groups in Pentaho . 278.PENTAHO – CHART REPORT. 31Steps to Create a Chart in Pentaho . 319.PENTAHO – FORMATTING REPORT ELEMENTS . 38Text Formatting. 38Adding Hyperlinks . 38Row Banding . 4110. PENTAHO – FUNCTIONS . 44Pentaho – Additional Functions . 48iii

1. PENTAHO – OVERVIEWPentahoWhat is Pentaho Reporting?Pentaho Reporting is a suite (collection of tools) for creating relational and analyticalreporting. Using Pentaho, we can transform complex data into meaningful reports anddraw information out of them. Pentaho supports creating reports in various formats suchas HTML, Excel, PDF, Text, CSV, and xml.Pentaho can accept data from different data sources including SQL databases, OLAP datasources, and even the Pentaho Data Integration ETL tool.Features of PentahoPentaho Reporting primarily includes a Reporting Engine, a Report Designer, a BusinessIntelligence (BI) Server. It comes loaded with the following features: Report Designer: Used for creating pixel perfect report. Metadata Editor: Allows to add user-friendly metadata domain to a data source. Report Designer and Design Studio: Used for fine-tuning of reports and ad-hocreporting. Pentaho user console web interface: Used for easily managing reports andanalyzing views.Ad-Hoc reporting interface: Offers a step-by-step wizard for designing simplereports. Output formats include PDF, RTF, HTML, and XLS. A complex scheduling sub-system: Allows users to execute reports at givenintervals. Mailing: Users can email a published report to other users. Connectivity: Connectivity between the reporting tools and the BI server, whichallows to publish the content directly to the BI server.1

2. PENTAHO – INSTALLATIONPentahoLet us now learn how to install and configure Pentaho Reporting Designer.PrerequisitesThe Pentaho Reporting engine requires Java environment. Therefore, before installingPentaho Reporting, make sure you have Java on your system. Based on the platform youare working on, use a command from the following table to verify your Java installation.OSCommandWindowsOpen commandprompt:\ java -versionLinuxOpen terminal: java –versionMac OSOpen terminal: java –versionOutputjava version "1.7.0 60"Java(TM) SE Runtime Environment (build 1.7.0 60b19)Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09,mixed mode)java version "1.7.0 60"OpenJDK Runtime Environment (rhel- 4x86 64) OpenJDK 64-Bit Server VM (build 60.7-b01,mixed mode)java version "1.7.0 60"Java(TM) SE Runtime Environment (build 1.7.0 60b19)Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09,mixed mode)If you do not have Java installed on your system, then download and install the sameusing the following link Download and Install Java.Download Pentaho ReportingDownload the latest versions of Pentaho Reporting Designer using the following links. Forthis tutorial, we are using version 3.7.0.OSURL link for download Pentaho Report DesignerWindowsPentaho Report Designer 3.7 for WindowsLinuxPentaho Report Designer 3.7 for LinuxMac OSPentaho Reporting Designer 3.7 for Mac OS2

PentahoInstall Pentaho ReportingAfter downloading the files, you will find an archive file of Pentaho Reporting Designernamed prd-ce-3.7.0-stable. That archive should be extracted as explained in thefollowing table.OSInstallation Instructions Extract the downloaded file using an Unziptool. Copy the extracted folder (prd-ce-3.7.0-stable) into c:\ directory.Windows Open c:\prd-ce-3.7.0-stable\report-designer directory. Start Pentaho Reporting Designer by double-clicking on the reportdesigner.bat file. Extract the downloaded file prd-ce-3.7.0-stable.tar.gz using thefollowing command. tar –zxvf prd-ce-3.7.0-stable.tar.gz Copy the extracted folder (prd-ce-3.7.0-stable) into “/usr/local/”directory using the following command.Linux# mv prd-ce-3.7.0-stable /usr/local/ Open directory andstart Pentaho Reporting Designer using the following commands. cd /usr/local/prd-ce-3.7.0-stable/report-designer Extract the downloaded file prd-ce-370-stable.tar.gz. You will find that folder in the Finder. Copy and Paste Pentaho Report Designer from Finer into /Applicationfolder. Start Pentaho Report Designer using the following command.Mac report-designer.sh3

PentahoInstall Database DriverPentaho Reporting Designer requires a database connection to generate relational reports,therefore you need to have a JDBC driver to communicate with the database. By default,Pentaho provides some JDBC drivers of different vendors to support different databasessuch as MySQL, H2, HypersonicSQL, Hive, etc.All the default database drivers are available in the /lib/ directory of the PentahoReporting Designer. If you want to use any other database, then download the respectiveJDBC driver and copy it into the /lib/ directory of Pentaho Reporting Designer. Otherwise,you can use ODBC driver via JDBC-ODBC bridge driver that comes with the JDK and thisbridge driver (JDBC-ODBC) is suitable for all database servers.For this tutorial, we are using MySQL database server and its respective drivers are alreadydownloaded with the Pentaho lib (/lib/ directory of the Pentaho Reporting Designer) files.Install Additional FontsPentaho Reporting uses different fonts to display text inside reports. When generating PDFfiles, the Pentaho Reporting Engine needs access to the physical font files. The reportingengine searches system dependent font paths to locate all usable fonts. In addition tothese fonts, your Java Runtime Environment may offer additional fonts, depending on yourJava and Operating system version.If you plan to create PDF documents with embedded fonts, please ensure that you onlyuse fonts that are physically accessible for the reporting engine.Regardless of your operating system, all font files located in JRE/lib/fonts/ are alwaysusable for all exports.4

PentahoEnd of ebook previewIf you liked what you saw Buy it from our store @ https://store.tutorialspoint.com5

Using Pentaho, we can transform complex data into meaningful reports and draw information out of them. Pentaho supports creating reports in various formats such as HTML, Excel, PDF, Text, CSV, and xml. Pentaho can accept data from different data sources including SQL databases, OLAP data