Skip to main content
Pentaho Documentation

Create a Link to a Report on a Chart

This section specifies how to create a chart within Report Designer that links to other reports or URLs. This action is known as creating a "hyperlink" or a "drill-down" on a link.
  1. Within the report, double-click on the chart to place a hyperlink. The Edit Chart window appears.
  2. Within the Edit Chart dialog box, scroll down to the Values section on the left panel. Select url-formula and a ... appears. Click on the ... to show the Formula Editor.
  3. Within the Formula Editor dialog box, select the last button on the right. This is the Drill-down Function button, which looks like a chain link. DRILLDOWN appears in the Formula box.
  4. In the top of the Formula Editor display, click on the drop-down box to select the Location type.
  5. Choose Pentaho Repository if the link opens a report from the repository.
    1. If you choose Pentaho Repository, enter the URL to the Pentaho server in the Server URL field. For example, http://<myPentahoServer>:<PortNumber>/<FileName>. Use the Path field to browse to the desired linking report.
  6. Choose URL if the link goes to a defined URL.
    1. If you choose URL, enter the URL for the link in the Path field. For example, http://www.<ApplicationName>/search?. If the URL requires parameters, you can define them in the Parameters section. Click the Add parameter button to add an entry for the parameter name and value. They must be defined as formulas. For example, myRegion = East or myLine = Trains. You can also use any data columns or functions in the formula. For this example, the URL generated is http://www.myApplication.com/search?...&myLine=Trains.
  7. Choose Self if the link goes to a custom web application and refers back to itself as a link.
    1. If Self is chosen, set the list of parameters that your web application passes back into the report. The parameter values need to be defined as a formula. You can also add any additional parameters and values that your custom web application requires. You may find it necessary to use the internal chart fields here.
  8. Within the Formula Editor display, view the Parameters applied to the report to ensure they are correct.
    1. Select the Report Parameters tab to view the parameters used in the targeted report. This tab shows all the parameters defined in the target report that can be mapped to the current report.
    2. Select the System Parameters tab to allow report designer to optionally control the behavior of the Report Viewer. The initial list provided is a pre-defined list of the most popular parameters. For example, TabActive (when set to true, allows the target report to open in a new tab) and TabName (when TabActive is to true, allows the tab name to be dynamically named using a formula) are frequently used as TabActive true and TabName = "[::chart-series-key]". The defined list of parameters can be found in the Report Viewer Plugin wiki.
    3. Select the Custom Parameters tab to add additional parameters to the report unique to a specific use case. In rare cases, this would be a situation where the Report Viewer has been extended to accept additional parameters.
  9. Depending on location type, a DRILLDOWN function is generated in the Formula section. For example, for a local report called oStatus that you want to link to Order Status.prpt, you would enter:
    =DRILLDOWN("local-prpt"; NA();
    {"oStatus"; ["chart::category-key"] | "showParameters"; [STATUS] |
       "solution"; "steel-wheels" | "path"; "reports" | "name"; 
       "OrderStatus.prpt"})
  10. Run the report in your desired format. Clicking the green arrow and select the desired output type from the drop-down menu. The final product appears.
  11. Double-click on the appropriate area within the chart to launch the link. The new report appears in the browser.
The report is linked to another report using a hyperlink. This is also known as a drill-down link on a report.