Time for action – publishing reports in Pentaho BA Server

Using PRD, we will open a report we created in earlier chapters and then publish it in Pentaho BA Server. We will configure the connection data required by Pentaho BA Server and then configure the data related to the publication. Finally, we will use PUC to run the report we have published.

  1. We start PRD and open a report of our choice; in this case, the report we propose is the one we created in the previous chapter: 13_Adding_Subreports.prpt.

    Note

    When publishing a report, Pentaho BA Server must be running.

  2. We publish this report in our Pentaho BA solutions folder (the Reporting folder).
  3. We select the following option in the shortcuts bar:
    Time for action – publishing reports in Pentaho BA Server

    Note

    We can also do the preceding task by navigating to File | Publish....

  4. The previous action will open a window for us to log in to Pentaho BA Server as shown in the following screenshot:
    Time for action – publishing reports in Pentaho BA Server

    Here we should complete the required information as follows:

    • URL: = http://localhost:8080/pentaho. This is the base URL where Pentaho BA Server is listening.
    • Timeout: = 30.
    • Version: = Pentaho BA-Server 5.0.
    • User: = admin. This is the Pentaho BA Server user that has permissions to publish content.
    • Password: = password. This is the admin user's password.

    Next, click on OK to continue.

  5. If we entered the data correctly, PRD will connect to Pentaho BA Server and we will see the following window:
    Time for action – publishing reports in Pentaho BA Server

    Here we should complete the options as follows:

    • File Name: Is the name that the file will be saved with in the Pentaho BA Server solutions repository. Here we leave the default value.
    • Title: Is the report identifier that we will later see in PUC. Here we leave the default value.
    • Report Description: Is the value that PUC will display as a tool tip. For this to work, the option Use Descriptions For Tooltips in View must be enabled in PUC. Here we leave the default value.
    • In Location: We must select the solutions folder where we want to save the file. We double-click on the public folder and then on the Reporting folder.
    • Output Type: Is used to establish the default output format when running the report. We choose the option HTML (Stream). The Lock option lets us block the output type selection so only the default value is used. The page will look as shown in the following screenshot:
    Time for action – publishing reports in Pentaho BA Server

    To publish the report, we click on OK.

    If the publication was successful, we will see the following message:

    Time for action – publishing reports in Pentaho BA Server

    If we want to run the published report now, we choose the option Yes; but what we want to do now is see this report from PUC, so we will choose the option No.

  6. Next we use PUC to run the report we just published.
  7. We open PUC in our preferred web browser by typing the following URL:

    http://localhost:8080/pentaho

  8. We log in with the user admin (whose password is password).
  9. We go to the Browse Files perspective.
  10. In the Browsing panel, we choose the folder public and then Reporting. Now in the Files panel, we will see the report we just published as shown in the following screenshot:
    Time for action – publishing reports in Pentaho BA Server
  11. In the Files panel, we double-click on the report 13_Adding_Subreports.
  12. Finally, we can see what our report looks like when we run it in PUC:
    Time for action – publishing reports in Pentaho BA Server

What just happened?

We used PRD to open the report 13_Adding_Subreports.prpt and publish it. We configured the connection data for Pentaho BA Server; among them, we configured the URL and the authentication credentials. Then we specified the solutions folder where the report was saved and established a default value for the output type. Finally, we accessed PUC using our preferred web browser and executed the published report.

Executing reports in Pentaho BA Server

As you can see, the report looks better when executed in PUC than when it is executed in PRD. The selector area is more stylized and can even be hidden.

Also, the solutions structure that Pentaho BA Server offers, that is, the folders and files, gives users great familiarity with the environment and drastically reduces their resistance to change.

To run the report, first we had to find it (/public/Reporting), which means we needed to know its exact location. Suppose a user with little technological experience needs to run a given report. What information should we give him or her? The login URL, the steps to follow to see the Browse Files perspective, a brief explanation on how to use the Browsing and Files panels, and finally, where the report in question is located. It seems like a lot, doesn't it?

But there is a solution to this problem. We can send the user a URL through which he/she only has to log in to see the report.

Doing this is very easy:

  1. We find the desired report and select the option Open in a new window.
  2. A new web browser window will open as shown in the preceding screenshot, showing only the report, without the PUC UI. What we should do is copy the URL and send it to the corresponding user. Refer to the following example:
    • http://localhost:8080/pentaho/api/repos/:public:Reporting:13_Adding_Subreports.prpt/viewer?

    Now suppose that the user needs the report to show the information for the country Egypt by default. The URL we should send is as follows:

    • http://localhost:8080/pentaho/api/repos/:public:Reporting:13_Adding_Subreports.prpt/viewer?SelectCountry=29

The option of sending just the URL to reference and access a report is an enormous facilitation to distribution. It avoids unnecessary delays in looking for a particular report and facilitates access to information.

Creating a schedule

One of the options that Pentaho 5.0 offers is the possibility of scheduling PRD reports. When scheduling a report, Pentaho BA Server precalculates the report data and saves a copy in the chosen format (HTML, PDF, and so on) so we do not have to wait for the data to load to see the report.

To create a schedule for a report, follow these basic steps:

  1. Find the desired report and select the option Schedule... as shown in the following screenshot:
    Creating a schedule

    Now the following wizard will open:

    Creating a schedule
  2. We need to complete the following information:
    • Schedule Name: Is the name the report will have once it is generated. For example, 13_Adding_Subreportes_Egypt.
    • Generated Content Location: Is where the report will be saved once it is generated. For example, /public/Reporting.

    The page will look like the following screenshot:

    Creating a schedule

    Now click on Next > to go to the next step in the wizard. The page will look like the following screenshot:

    Creating a schedule
  3. We should enter the schedule's Recurrence (Run Once, Daily, Yearly, and so on), its Start Time, and the details of the selected Recurrence option.

    To continue, click on Next >. The following page will open:

    Creating a schedule
  4. The next step is to choose the report's Parameters and Output Type option. To save the schedule, click on OK.

    To see the schedules, choose the Schedules perspective. The page will look like the following screenshot:

    Creating a schedule
    Once the schedule has been executed, we can see the precalculated reports. We can also choose a schedule and click on Creating a schedule to run it now.

    The precalculated reports are generated in the specified folder. In this case, if we go to the Browse Files perspective, we will see the following screenshot:

    Creating a schedule

Uploading reports

We have seen how to publish reports in Pentaho BA Server using the PRD UI. Now we will see how to import reports from PUC. This is a new characteristic in Pentaho 5.0.

The first thing to do is select the solutions folder where the report will be imported. Then, click on the option Upload... as shown in the following screenshot:

Uploading reports

Finally, find and select the desired report using the Browse... button, verify the Advanced Options option, and click on OK as shown in the following screenshot:

Uploading reports

Have a go hero

We propose a series of tasks for you to carry out as follows:

  • Use PRD to publish the reports 01_Hello_World.prpt, 03_Adding_Relational_DS.prpt, and 05_Adding_Groups.prpt
  • Use PUC to import the reports 07_Adding_Parameters.prpt, 09_Using_Formulas.prpt, and 11_Adding_Graphics.prpt
  • Compare the time and number of steps you had to take to publish and import the reports
  • Generate a URL for the report 07_Adding_Parameters.prpt in which the rating PG, the year 2005, and the month May are selected by default
  • Add a schedule to the report 09_Using_Formulas.prpt so that it is executed every day at 7:00 in the morning

Pop quiz – Pentaho

Q1. State whether the following statements are true or false:

  1. Pentaho's license is the GNU LGPL.
  2. The Pentaho suite is made up of multiple components that interact with each other.
  3. Pentaho is written in Java.
  4. Pentaho BA Server, as well as PRD, requires JDK or JRE.
  5. The path where the JDBC drivers should be copied in order for the Pentaho BA Server to use them is [PUC_HOME]/tomcat/jdbc.
  6. If we want to publish a report with PRD, Pentaho BA Server needs to be running.
  7. When we are importing a report from PUC, it is possible to indicate the default parameters that the report should have.
  8. In PUC, when we create a schedule for a report, we should always indicate the value of its parameters.
..................Content has been hidden....................

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