Adding a New Parameter

Create a new parameter by assigning it a name and other properties.

The parameter name you choose must not exceed the maximum length allowed for an identifier by your database. Refer to your database documentation for identifier length limitations.

Supported types are:

Default parameter values are also used to preview the report output when you design report layouts using Oracle BI Publisher Layout Editor.

BI Publisher supports parameters that are of type text entry or menu (list of values) but not both. You cannot define a combination parameter that enables a user to enter a text value or choose from a menu list of values.

You can configure row placement at the report level. The report definition supports additional display options for parameters. For more information, see Configuring Parameter Settings for the Report in Report Designer's Guide for Oracle Business Intelligence Publisher.

  1. On the Data Model components pane, click Parameters and then click Create new Parameter.
  2. Enter a Name for the parameter.
    The name must match any references to this parameter in the data set.
  3. Select the Data Type from the list. A Date data type only supports a Date Parameter Type.
  4. Enter a Default Value for the parameter. This is recommended to prevent long running queries.
  5. Select the Parameter Type.
  6. In the Row Placement setting configure the number of rows for displaying the parameters and in which row to place each parameter.

    For example, if your report has six parameters, you can assign each parameter to a separate row, 1 - 6, with one being the top row; or, you can assign two parameters each to rows 1, 2, 3. By default, all parameters are assigned to row 1.

Creating a Text Parameter

The Text type parameter provides a text box to prompt the user to enter a text entry to pass as the parameter to the data source.

  1. Select Text from the Parameter Type list.
  2. Enter the Display Label, for example, Department.
  3. Enter the Text Field Size as an integer, for example, 25.
  4. Enable the following Options if required:
    • Text field contains comma-separated values - Enables the user to enter multiple comma-delimited values for this parameter. The parameter in your data source must be defined to support multiple values.

    • Refresh other parameters on change - Performs a partial page refresh to refresh any other parameters whose values are dependent on the value of this one.

The figure below shows how the Department parameter displays to the report consumer.

Creating a Menu Parameter

A Menu type parameter presents a list of values to the user.

You must define the list of values first. See Adding Lists of Values. The Menu type parameter supports the data types of String and Integer only.

The Menu parameter definition includes various options, as shown in the figure below.

  1. Select Menu from the Parameter Type list. The lower pane displays the appropriate fields.
  2. In Data Type, select String or Integer.
  3. Enter the Display Label. The display label is the label that displays to users when they view the report. For example: Department.
  4. Enter the Number of Values to Display in List. If the number of values in the list exceeds the entry in this field, the user must click Search to find a value not displayed, as shown in the figure below. This field defaults to 100.
  5. Select the List of Values that you defined for this parameter.
  6. Enable the following Options if required:
    • Multiple Selection - Allows the user to select multiple entries from the list. Your data source must be able to support multiple values for the parameter. The display of a menu parameter that supports multiple selection differs. See the two figures below.

    • Can select all - Inserts an All option in the list.

      When the user selects All from the list of values, you have the option of passing a null value for the parameter or all list values. Choose NULL Value Passed or All Values Passed.

      Note:

      Using * passes a null, so you must handle the null in your data source. A method to handle the null would be the standard Oracle NVL command, for example:

      where customer_id = nvl(:cstid, customer_id)

      where cstid is a value passed from the list of values, and when the user selects All it passes a null value.

    • Refresh other parameters on change — Performs a partial page refresh to refresh any other parameters whose values are dependent on the value of this one.

The figure below shows how the Department menu type parameter displays to the report consumer when multiple selection is not enabled.

The figure below shows how the Department menu type parameter displays to the report consumer when multiple selection is enabled.

Customizing the Display of Menu Parameters

The display of menu parameters in the report can be further customized in the report definition.

Menu type parameters support the additional display option as a static list of checkboxes or radio buttons. For more information, see Configuring Parameter Settings for the Report in Report Designer's Guide for Oracle Business Intelligence Publisher.

Defining a Date Parameter

The Date type parameter provides a date picker to prompt the user to enter a date to pass as the parameter to the data source.

  1. Select Date from the Parameter Type list. The lower pane displays the appropriate fields for your selection.
  2. Enter the Display Label. The display label is the label that displays to users when they view the report. For example: Hire Date.
  3. Enter the Text Field Size as an integer. This field determines the number of characters that the user can enter into the text box for the date entry. For example: 10.
  4. Enter the Date Format String. The format must be a Java date format, for example, MM-dd-yyyy.
  5. Optionally, enter a Date From and Date To. The dates entered here define the date range that are presented to the user by the date picker. For example if you enter the Date From as 01-01-1990, the date picker does not allow the user to select a date before 01-01-1990. Leave the Date To blank to enable all future dates.

The figure shows how the Hire Date parameter displays to the report consumer.