Back to Devexpress

Specify Query Parameters

eud-eud-for-devexpress-reports-reporting-for-desktop-report-designer-report-designer-for-winforms-bind-to-data-specify-query-parameters.md

latest4.2 KB
Original Source

Specify Query Parameters

  • Feb 09, 2026
  • 4 minutes to read

This document provides general information on query parameters and describes common ways of utilizing parametrized SQL queries to filter data at the data source level.

Query Parameters Overview

A query parameter holds an external value that is inserted into an SQL statement before query execution. This value can be either static or dynamically generated by an associated expression.

The query parameter value is inserted into the resulting SQL query string in the “@QueryParameterName” placeholder’s position.

Query parameters are used in the following scenarios:

You can access query parameters using the Parameters property of the query the report’s SqlDataSource component exposes. These parameters include the ones you created within the Query Builder or that were generated for the data source’s stored procedure. You can also access the query’s filter string using the Filter String property. This filter string includes the filter that you specified in the Query Builder.

You can add new query parameters in the Query Parameters dialog and modify the filter within the Filter Editor.

Configure Query Parameters

The following properties are available for each query parameter:

  • Name - specifies the parameter’s name.
  • Type - specifies the parameter value’s data type.
  • Expression - determines whether the actual parameter value is static or generated dynamically.
  • Value - determines the query parameter’s actual value. If the Expression option is enabled, the actual parameter value is produced dynamically by calculating an associated expression. This is useful when you map the query parameter value to the report parameter value. Refer to the next document section for more information.

Provide the Query Parameter Value

Below, you can see how a value is specified for a query parameter within the Data Source Wizard’s page. You can also specify query parameter values in the Report Wizard or the Query Parameters dialog in the same way.

  • Specifying a static value

  • Providing a dynamic value

Pass a Multi-Value Parameter Value to a Query

You can map multi-value parameters to query parameters. For instance, the following query selects the orders whose IDs can be found within the values the @OrderID query parameter provides.

Pass a Multi-Value Report Parameter Value to a Stored Procedure

You cannot pass a multi-value parameter value to a stored procedure directly. Use one of the following expression functions: