Adding Parameter – Pentaho Report Designer | Stop repetitive task

Published by

on


[Update 2023]: If you are an Enterprise user of Pentaho/Hitachi Vantara, please contact the Pentaho support team to help with approved solutions and approach. Otherwise, you could possibly violate the contract of the PRD.

In Pentaho Report Designer, adding a parameter is a very simple process. You just need to go to the “Data” Section of the PRD and click on “Add Parameter” to add any new parameter to the report. More details are given in the Pentaho Infocenter.

But suppose you got 200 of pentaho reports and you need to add 2 parameters (for e.g. : adding parameter CAR MODEL and TYPE). Now imagine you are told to manually open every single 200 reports and keep on adding these two parameters. Its a very tedious and frustrating time-consuming work. Also this approach might result in more errors in the reports. So one way to avoid this scenario is to create an automated script which can easily insert these parameters to all of 200 reports in easy, no time and error-free way.

Pentaho Reports are a collection of xml files wrapped/zipped around a single folder. Try “unzipping” the Pentaho reports and you will find a directory structure as below image:

Pentaho Report - Directory Structure of XML files
Pentaho Report – Directory Structure of XML files

Each of these xml files contains the information of all your PRD activity like adding labels, SQL queries, color change, etc. So our idea of adding parameter is to find the XML file which holds the parameter metadata information in PRD.

Subscribe to continue reading

Subscribe to get access to the rest of this post and other subscriber-only content.

One response to “Adding Parameter – Pentaho Report Designer | Stop repetitive task”