View on GitHub

dotnet-eud

.NET Controls End-User Documentation

Filter Queries

SQL queries constructed in the Query Builder can be filtered by including WHERE clauses to the query. Filtering can be applied to either underlying or aggregated data. You can also limit the number of returned records when filtering data.

Invoke the Filter Editor

To filter data in the Query Builder, click the Filter… button… in the Data Source ribbon tab…

EditQueriesButton_Ribbon

… or use a corresponding button within the Query Builder. This will invoke the Filter Editor dialog, which allows you to build filter criteria.

FilterEditorDialog_SqlDataSource

The Filter tab allows you to filter underlying data while the Group Filter tab provides the capability to filter data aggregated on the server side.

Filter Data

In the Filter Editor, you can compare a field value with the following objects.

Thus, you can pass the query parameter to the filter string. To do this, click the Parameters_FilterEditor_CompareButton button, then click the Parameters_FilterEditor_CompareButton2 button and finally click <select a parameter>.

FilterEditorDialog_AddParameterMenu

In the invoked popup menu, you can choose from the following options.

The Group Filter tab of the Filter Editor allows you to apply filtering to grouped/aggregated data fields by including HAVING clauses to the query. Grouping and aggregation are managed by the Group By and Aggregate options in the Query Builder. To learn more, see the Edit Column Settings paragraph in the Query Builder topic.

Add Limits

The Filter Editor also allows you to limit the number of returned records. To do this, enable the Select only checkbox and specify the number of records to be returned.

FilterEditorDialog_TopSkip

You can also skip the required number of records in the returned dataset by specifying the records starting with index value.

[!NOTE] Note that the Sorting type should be specified in the Query Builder to enable the capability to skip the specified number of records. To learn how to apply sorting, see the Edit Column Settings paragraph in the Query Builder topic.