Parameters

Parameters enable the final user to interact with the contents of the report, allowing the reports to present dynamically generated content and adapt to the needs of the user.

Pentaho Report Designer (PRD) allows the inclusion of parameters in its reports by means of a fairly nice UI. Parameters in PRD can be quite simple, such as the selection of a value from a list, or more complex, such as when nested parameters are created so that setting a value in one of them causes the modification of the values of others. This means that the data set obtained by the nested parameter depends on the values selected in another parameter. In the first case we could establish a list containing every year in which films were rented, and have the user select one of them:

Parameters

In the second example, we could create two parameters so that one of them holds every country, and the other one holds every city available, and have them behave in a way such that when the user selects a country, the other parameter presents the cities belonging to the country previously selected:

Parameters

When nesting parameters, there is no limit as to how many hierarchical levels can be created.

At the time of adding parameters to our reports we can also use one single report and make it adapt to different use cases. For example, a production report grouped by the assembly line on which every manufactured product is present could be (and it is, in fact) too much information to present on a single report. In this case the addition of parameters to select the assembly line and/or the product type not only simplifies the report but also enables this report to be used by different users with different needs for information.

Another important point to consider is the possibility of creating reports that provide an analysis of more details and focus on the need for information of the current user.

By configuring our parameters on PRD, we are able to determine the way in which these will be presented to the final users. Next, we will explain each of these selectors or display types using as an example the film's rating list, whose values can be: G, PG, PG-13, R, or NC-17.

We will now look into the different display types available for use:

  • Dropdown: This display type allows the selection of a single value from the list, and it is most commonly used for simple selections. It is used when the list to be shown is not too long.
    Parameters
  • Single value list: This display type also allows the selection of a single value from the list. In comparison to the previous selector (dropdown), this one uses more space but at the same time eases the search of values in long lists.
    Parameters
  • Multivalue list: This display type allows the selection of one or more values from the list. It is not used much since the checkbox display type works in a similar way and is much more intuitive.
    Parameters
  • Radio button: This display type allows the selection of a single value from the list. It is commonly used when the list of values is short and there is a need for visualizing every available option.
    Parameters
  • Checkbox: This display type allows the selection of one or more values from the list and it is the most commonly used for multiple selections. It can be used to show both short and long lists.
    Parameters
  • Single selection button: This display type allows for the selection of a single value from the list. It is used when the list is short and there is a need to keep every other value visible. As can be seen, it does not use too much screen space.
    Parameters
  • Multiselection button: This display type is similar to Single Selection Button, but allows for the selection of one or more values.
    Parameters
  • Textbox: This display type is commonly used when the final user wants to perform a search for a certain value, but does not know precisely what it is, or when the search cannot be predetermined. For example, this selector could be used to filter customers whose last names begin with the value present in the selector, or to show a report in which only the customers who have made purchases for a value greater than the one currently in the selector are present.
    Parameters
  • Text area: This display type is similar to a textbox, but allows for the input of many characters. This is why horizontal and vertical scroll bars are present.
    Parameters
  • Date picker: This display type is used so that the user can select a date from the Gregorian calendar.
    Parameters
    If the Parameters button is pressed, a quite useful interface for the selection of a date will pop up:
    Parameters
..................Content has been hidden....................

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