The Pentaho Reporting Web Viewer is a web-based application that allows direct access to Pentaho Reports (*.prpt) saved within content repository of the Pentaho BI Server. It can be decomposed into two sections: the report prompt and the rendered report content. The report prompt leverages the power of Pentaho CDF to dynamically create a collection of input controls for users to change report parameters values for a given report.
The CDF-based Pentaho Reporting Web Viewer was introduced in Pentaho Platform Reporting Plugin version 4.5.0 and is included in the BI Server 4.5+.
You can find the source code for the Pentaho Reporting Web Viewer project here:
The Pentaho Reporting Web Viewer is built from the ground up to be extensible. Every part of the Report Viewer from the prompting to report content display can be overridden easily to allow a tight integration or custom behavior where desired.
From a high level the Reporting Web Viewer relies on a few different pieces:
- Pentaho Prompting API: Used to create the report prompt
- Dojo (various custom widgets)
- RequireJS and Asynchronous Module Definitions (AMD) API: http://requirejs.org/docs/whyamd.html
Customizing the Reporting Web Viewer
The core of the Reporting Web Viewer is the
Prompt from here on out.
Prompt is designed to be a Pentaho Reporting-specific Pentaho Prompting implementation to provide the prompt for a report. It is where prompt refreshing (for cascading prompts), session timeout, and Pentaho Reporting prompt parsing is implemented. It contains the Pentaho Prompting
pentaho.common.prompting.PromptPanel reference and is responsible for initializing it.
Viewer handles all interactions with the view: rendering the report as a styled page, updating the page control, providing localization, and providing hooks for report designers to use (
Custom Prompting Components
For information on how to define your own custom prompting component check out the Pentaho Prompting Project project page for more documentation.
Custom prompt components are registered as external resources in the plugin's
plugin.xml. See this file for an example component.
Custom Prompts for individual reports
At this time we do not support embedding custom prompts within individual reports. Any custom components are defined for all reports or can be dynamically added on a per-report basis when the report viewer is loaded for a specific report. This logic can be done in a sample component so enable itself only under certain conditions.