Time for action – creating our first hyperlink

Now we will create a Hyperlink that lets us open a PRD report. We will create the Hyperlink on a text-field that contains the name of the country currently under analysis. Clicking on the Hyperlink will open a report that gives us information about that country.

  1. We create a Hyperlink on the text-field object that has the value country in the field Attributes.field. We select the object, right-click on it, and in the context menu choose Hyperlink... as shown in the following screenshot:
    Time for action – creating our first hyperlink

    This will open the Hyperlink's Editor as shown in the following screenshot:

    Time for action – creating our first hyperlink
  2. The purpose of this Hyperlink is to link to a Pentaho BA Server solutions report and assign a value to its Parameter, according to the country the user clicks on.

    To accomplish this, we complete the Editor's formula as follows:

    • Location: = Pentaho Repository.
    • Include server URL in path = True. With this option, the Hyperlink includes in its definition the value of Server URL:.
    • To complete the value of Server URL:, we click on the Login button. This will open a window, as shown in the following screenshot, for us to log in to the Pentaho BA Server (which must be running):
      Time for action – creating our first hyperlink

      We complete the login information as follows:

      • User: = admin
      • Password: = password

      Then we click on OK. Once we are logged into the Pentaho BA Server, the following options will be much easier to complete, as we will be able to navigate through the solutions folders and see the Parameters of the report we choose. The user we use to log in should be an admin.

      • In the field Path we should enter the location of the report to link to. We click on the Browse button, navigate to the path /public/Reporting, and choose the report 13_Adding_Subreports.prpt as shown in the following screenshot:
      Time for action – creating our first hyperlink

      Next, we click on OK to continue.

      • Target = _BLANK. This will open the report in a new window.

        Note

        The values this attribute can take are the same as the HTML specifications for the tag <a>. For more information, visit the following page: http://www.w3schools.com/tags/att_a_t arget.asp

      • Tooltip = Press click for more details...; this is the text that will appear if we hover over the text for a few seconds.
      • In Report Parameters, we find a table with the Parameters that the report we are creating a Hyperlink to receives. We should assign the value [country_id] to the Parameter SelectCountry as shown in the following screenshot:
      Time for action – creating our first hyperlink

      Next, we click on OK to continue.

  3. Now we run our report as HTML to test the Hyperlink we just created. We click on Canada as shown in the following screenshot:
    Time for action – creating our first hyperlink

    As we can see, this will open a new tab in the web browser, where the selected country will be passed to the report 13_Adding_Subreports.prpt as shown in the following screenshot:

    Time for action – creating our first hyperlink
  4. Next, we will see where the configuration of the Hyperlink we created is saved.
    • We select the text-field in question
    • We click on the Structure tab, and in the Style panel we look for the category links as shown in the following screenshot:
    Time for action – creating our first hyperlink

    If we look closely, we will see that the configuration of our Hyperlink has been saved in Style.url, Style.url-tooltip, and Style.url-window-target.

    If we click on the Time for action – creating our first hyperlink icon located to the right-hand side of Style.url, we will see that the Hyperlink's logic is created through the Open FormulaDRILLDOWN function:
      =DRILLDOWN("remote-sugar"; "http://localhost:8080/pentaho";{"SelectCountry"; [country_id] | "::pentaho-path"; "/public/Reporting/13_Adding_Subreports.prpt"})
    

Note

For more information about DRILLDOWN, visit the following page: http://wiki.pentaho.com/display/Reporting/DrillLinking.

What just happened?

We chose the text-field that has the value country and we created a Hyperlink on it. We configured the Hyperlink to run the report 13_Adding_Subreports.prpt and send the value of [country_id] to its Parameter, SelectCountry. We saw where and how the information related to the Hyperlink is saved. Finally, we analyzed the Open Formula DRILLDOWN function.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset