Problem Statement :
All of us are aware of the fact that Pentaho provides advanced reporting features. Developing a static report through Pentaho Report Designer(PRD) is straightforward. How ever some times we will come across a need to develop interactive reports using PRD. Hyper linking is one the way to achieve required dynamism in reports. We don’t see enough documentation about this topic in web.
Scope of this Article:
As part of this article we are covering following topics
- Hyper linking of a report entity to open another URL
- Linking of a report entity to open another PRPT report
- Pentaho Report Designer 3.9.0 GA
Hyper linking of a report entity to open another URL
I have taken an sample PRPT report which shows product details. Report has following fields
On click of Productname, images related to that product will be displayed
Linking of a report entity to open another PRPT report
I have taken a sample report which will show, product category and product name . on click of product name, it opens another PRPT report which we covered in first use case.
Hyperlink with Location URL:
select an element for which you want to create a hyperlink.
- Right-Click on the element and select hyperlink.
- select the location type as URL. Place fully Qualified URL in path.In my case I am using http://www.google.com/images and output type as BLANK .If you want some string to show when you focus(mouse over) on the productline then you can write in the tool tip.Mention the parameter in the parameter pane . This will be the value to search. As we are passing productline as the parameter . productline value will be searched in google images.
- Select ok and run the report .Open the output pdf file , you can see a screenshot as below. When you do an mouse over on “byke” , you can find an tool tip , this is the hyperlink value.
- If you click on any row of the productline field you can see that value is searched in the given path . As i selected Byke , Search related to bikes are done.You can see that from the following screen shot.
Hyperlink with Pentaho Repository:
To hyperlink a report using pentaho repository you need a published report.(click here to know how to publish a report)
Creating a hyperlink to a Existing Report in the server
- create a new report(Master Report) so that you can create a hyperlink to the published report.
- Select the element for which you want to create a hyperlink and right click on it and select hyperlink.
- Select the location type as Pentaho Repository.
- login into the server and select the report for which you want to hyperlink to.
- Give the target type and the parameters if you are using a PARAMETERIZED report.
- Click ok
1. Following is the output from main report . As we are defining hyperlink at Product Category values . By using an mouse over on Product Category values we can see the tool tip that is point to report . (Main report and hyperlink report are not logically related(i.e no parameter is passed), hyperlink Report is an individual Report)
2. By clicking on any of the product category entity , you will be redirect to hyperlink report ,As shown in the following output.
This article helps you to understand in detail ,how hyperlinks can be used in PRD
Walking Tree promotes Pentaho and we support the corporates as well as the developers to ensure that the business is able to take complete advantage of Pentaho’s wonderful capability. In case you are looking for a professional assistance then do visit our website to get in touch with us.