Filtering Data

<< Click to Display Table of Contents >>

Navigation:  User Interface Reference > Report Designer > Report Designer for WPF > Creating Reports > Shaping Data >

Filtering Data

Interface Elements for Desktop > Report Designer > Report Designer for WPF > Creating Reports > Shaping Data > Filtering Data

If a report is bound to a data source that contains far more data rows than are necessary for processing report creation, you can exclude excessive or undesired data. To accomplish this, construct a filtering expression using single or multiple data fields.

This document describes two approaches to filtering data in the Report Designer.

Filter Data at the Report Level

Filter Data at the Data Source Level

ExpandedCollapsed Filter Data at the Report Level

To filter a report's data, do the following.

1.Right-click the report and select Edit... in the context menu. In the invoked dialog, click the ellipsis button for the Filter String property.

img123691

2.Then, in the invoked Filter String Editor, specify the filtering expression.

img123692

When creating a filter criteria, you can create and edit logical expressions, and also join the expression groups with And, Or, NotAnd, and NotOr operators. In every filter condition, the left part contains either the data field name, or the name of the calculated field, which exists in this data source at the same level. The right part of the condition contains either a certain numerical or string value, or the name of the report parameter.

To access parameters, click the icon on the right, until it turns into a question mark.

img123693

To quit the dialog and save the changes, click OK.

ExpandedCollapsed Filter Data at the Data Source Level

To filter data before it has been supplied to a report, you can modify a query of an SqlDataSource assigned to the report's Data Source property. To do this, perform the following steps.

1.Invoke the Manage Queries dialog using one of the following ways.

oSwitch to the Report Explorer and right-click the data source item under the Components node. In the invoked context menu, select the Manage Queries... command.

img123522

oSelect a data source, and in the Properties Panel, click the ellipsis button for the Queries property.

img123855

2.In the invoked dialog, click the ellipsis button corresponding to the required query.

img123861

3.Next, in the invoked Data Source Wizard, click the Run Query Builder... button.

img123870

4.In the Query Builder, click the Filter... button.

img123871

5.In the invoked Filter Editor, construct a filtering expression that will be used to filter resulting data at the data source level.

img123872

Note that it is possible to embed query parameters into the expression.

ExpandedCollapsed See Also

Grouping Data

Sorting Data

Query Parameters

Copyright (c) 1998-2016 Developer Express Inc. All rights reserved.

Send Feedback on this topic to DevExpress.