Adding Parameters for Data Selection at Run Time

How to:

You can add new parameters to your report or chart to create parameter options for selection at run time. This enables you to dynamically select and review different scenarios with your data, offering you on-demand, dynamic report or chart creation at run time.

When you add a parameter, it becomes a field container into which you can add one or more measures and dimensions. You create a new parameter by right-clicking on a field container in the Query pane and clicking New Parameter. This creates a numbered parameter (for example, Parameter 1). In cases where you have multiple parameters defined, the numbering is applied sequentially.

Once you add a parameter, you can rename the variable by right-clicking the Parameter-n field container and clicking Rename Variable, where n is the number of the parameter that was added. Once you rename a parameter field container, the new title displays in the Query pane and at run-time. This allows you to easily identify the parameters while categorizing the data fields that you want each to contain. For example, if you add a number of Sales-related fields to a parameter, you can rename the parameter with a title of Sales to encapsulate the data fields that you selected. Parameters should be renamed before you run the report or chart so that they are easy to identify.

In order to populate parameters in your report or chart, data fields must be placed in the parameter field container. You can do this by selecting fields from the Data pane and dragging them into the relevant parameter field containers that you create.

Note: Double-clicking the data fields in the Data pane places the data field in the default field containers in the Query pane, not the parameter field container. For example, in a report, if you double-click Discount, the data field is placed in the Sum container (outside of the parameter field container that you created). You can always drag a data field into a parameter container from another field container in the Query pane if you wish to consider it a parameter.

You can also reorder the data fields that you have placed in a given parameter field container by dragging them into the order that you wish to display them at run time. Parameters can be specified in any field container, with the exception of Multi-graph. Once you have defined your parameters and selected the relevant data fields, run the report or chart. Using the drop-down lists for each parameter, you can select different options from the parameter lists to view the data in your report or chart dynamically. To load different scenarios, select the values and then click Run.

The following image shows the Query pane with a number of parameters and data fields specified.

Procedure: How to Add a Parameter

  1. Create a new report or chart or open an existing one.
  2. Add a new parameter by right-clicking a field container and clicking New Parameter , as shown in the following image.

    A new parameter field container is added.

  3. Add the data fields that you would like to display in a parameter list at run time to the new parameter field container.
  4. Optionally, rename the parameter by right-clicking the parameter and clicking Rename Variable.

    This is not required, but it does help in differentiating the various numbered parameters that display, depending on how many you define.

  5. Optionally, add one or more additional parameters, and relevant data fields, into the field containers for which you would like to select data values at run time.
  6. On the Quick Access toolbar, click Run.

    You can use the Parameter drop-down lists that display at run-time to create different views of your data, as shown in the following image.

    Note: You can optionally run your report or chart using the default parameters without making a selection. Click the down arrow on the Run button in the Quick Access toolbar and select Run with Default Parameter Values.

    The following navigational icons display at run time:

    Icon

    Description

    Close Filter Panel. Click this option to collapse the filter panel, displaying more of the report or chart in the right pane.

    Reset filter values. Click this option to reset the filter values to their default values, as indicated when the parameter was initially set up.

    Run with filter values. Click this option to run the report or chart based on your selections.

    Show filter panel. Click this option to show the filter panel when viewing a report or chart. When viewing the filter panel, you can close it by clicking Close Filter panel.

WebFOCUS

Feedback