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

Chapter 14. Building Interactive Reports

In this chapter, you will learn to enable interactive functionality in reports. Interactive reports are less common, but allow for interesting behaviors in various output formats. Each type of interactive approach covered in this chapter is based on a particular layout engine. You will learn about HTML interactive options by creating examples that demonstrate their capabilities. By definition, interactive reports are based on events. Event bindings are defined in the report definition, making it possible to receive event notifications from within a report.

This chapter is highly technical and written as a tutorial for pure Java developers. By the end of this chapter, you would have learnt how to modify report definitions to generate hyperlink events and many different HTML or JavaScript events, and how to modify the report HTML document object model dynamically when events are triggered from the report.

Interactive reports in HTML


With Pentaho Reporting, it is possible to define highly customized interactive reports in the HTML/JavaScript environment. Pentaho Reporting defines a set of properties which, when specified, allow for rich interactivity between the user and the report. In this section, you will get an overview of these properties, along with a rich example that demonstrates potential uses.

In Chapter 5, Design and Layout in Report Designer, you have already learnt everything about the HTML properties, but here we would like to again share the details of the properties for better understanding:

Example of interactive reports using Java


Thanks to the Pentaho Reporting capabilities, the development of interactive reports is straightforward. As a demonstration of how an interactive report would work, you will see here how to develop different types of interactions. The examples shared here cannot be exhaustive, but will give you an overview of the most relevant features you can use in your future developments.

Opening a static URL from a Pentaho report

The first example we are going to show is about a very basic feature: opening a custom URL by clicking on a report's element. To see in action a working example, a complete project is available in the https://github.com/fcorti/pentaho-8-reporting-for-java-developers repository, specifically, in the interactive-report project stored in the Chapter 14 - Building interactive reports folder.

Looking at the source code of the project, there is something we didn't have the change to see in the previous chapters of the book: how to preview a...

Summary


In this chapter, you learned the basics of developing interactive reports and saw some practical examples that you could use in your future development. After the discovery of the technical solutions, the advice to use the interactive features with moderation has been brought to your attention.

Now that you have read this chapter, you should feel comfortable with the generation of interactive reports using hyperlink events and many different HTML or JavaScript events. This chapter closes the part of the book dedicated to Java development and APIs. In the next part, you will see how to use Pentaho reports in other components of the Pentaho Suite.

lock icon
The rest of the chapter is locked
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

Name

Description

class

This property sets the class attribute of the current HTML entity to the specified value.

name

This property sets the name attribute of the current HTML entity to the specified value.

title

This property sets the title attribute of the current HTML entity to the specified value.

xml-id

This property allows the naming of the current HTML entity, setting the id attribute, making...