Parameterized Report

This tutorial describes the steps to create a report with parameters. In this example, we will create two date-time parameters to filter out orders that don't fall in the specified range from the report.

To add parameters and filter your report based on their values, follow the steps below.

  1. First, Create a new report and bind it to a data source.

  2. In the Field List panel, select the Parameters node and click the Add parameter button to the right.

  3. Click the Edit button () to expand the properties list. Specify the Name and Description of the created parameter, and make sure to set its Type to an appropriate value. To display this parameter in the Preview Parameters Panel, Visible property.

    Note

    In the Document Preview, Visible property.

  4. To assign a list of values to this report parameter, specify the Look-Up Settings Type property.

    Set this property to the Dynamic List to obtain parameter values from a data source. In this case, you should specify a parameter's data source, data member, value member and display member. The value member defines a data field that provides values to the parameter. The display member defines a data field that provides display names for parameter values (how these values appear in the user interface available in a Print Preview).

    Set this property to Static list to manually fill the list of parameter values. Each parameter value has an individual description (specifying how this value appears in the Preview Parameters Panel).

    Then, repeat the previous steps to create the second parameter, so that every time your report is previewed, you will be asked to specify two dates.

    The following instructions explain how to use parameters to filter your report's data.

  5. Switch to the Properties Panel and click the ellipsis button for the report's Filter String property.

    Then, in the invoked Filter Editor, Parameter item. This will convert the value placeholder into a parameter placeholder. Next, click the placeholder to choose the parameter.

    Click Save to exit the Filter Editor.

The parameterized report is now ready. Switch the report to the Preview mode, and in the Preview Parameters Panel, Submit.