All docs
V20.2
21.1 (EAP/Beta)
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

XRCrossTab.FilterString Property

Specifies the Cross Tab's filter criteria.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.2.dll

Declaration

[SRCategory(ReportStringId.CatData)]
[DefaultValue("")]
public string FilterString { get; set; }

Property Value

Type Default Description
String

String.Empty

The filter criteria.

Remarks

You can access this property in the Cross Tab's smart tag or in the Properties window.

Filter Data

Click the FilterString property's ellipsis button to invoke the FilterString Editor. It provides an advanced UI and allows you to specify an unlimited number of filter conditions.

The following image demonstrates the Cross Tab with the applied filter.

Filter Data Based on a Report Parameter

You can filter Cross Tab data based on a report parameter's values.

Select the Cross Tab and click the Parameters property's ellipsis button.

Click Add to create a new internal Cross Tab parameter. Bind it to the report parameter.

In the Filter Editor, compare a data field to the created parameter's value. Click the icon on the left until it turns into a question mark and select the parameter in the invoked list.

TIP

You can create Cross Tab parameters right in the Filter Editor. Click Add Parameter and bind the created parameter in the invoked dialog.

Switch to Print Preview and choose report parameter values in the Parameters panel. Click Sumbit to regenerate the document and filter the Cross Tab.

Filter Data based on Report Context

You can filter the Cross Tab based on any data field available in a report.

In the following example, the Cross Tab is bound to the same data source as its parent report. The report data is grouped against the CategoryName data field, and the Cross Tab in located the Group Header band.

When the report is previewed, the Cross Tab displays the entire data set in each group (that is, displays information for all categories regardless of the group settings).

Do the following to obtain a report's current group value (the current category) and filter the Cross Tab by this category:

  • Click the FilterString property's ellipsis button to invoke the FilterString Editor.

  • Select the CategoryName field as the left operand.

  • Click the right operand's icon until it turns into a question mark.
  • Click the right operand's placeholder and select Add Parameter.

  • In the invoked Add New Parameter dialog, bind a parameter to the report's CategoryName data field. This adds the parameter to the Cross Tab's Parameters collection.

  • In the Filter Editor, compare the Cross Tab's CategoryName field with the created parameter's values.

The following image demonstrates the result.

See Also