# Filtering Data

Quickly view data according to your custom criteria using the filter feature in FlexReport. See more demos, documentation, and samples here.

## Content



Filtering a data is important where you want to view only a portion of data based on certain criteria. In FlexReport, the data is filtered by using [DataSource.Filter](/componentone/docs/win/online-flexreport/).

Lets say you want to view the employee detail corresponding to an Employee ID for the report created in [FlexReport Quick Start](/componentone/docs/win/online-flexreport/flexreport-quickstart). Add the following code where EmployeeID field is added in the Detail section, to Filter the employee detail corresponding to the 'EmployeeID = 2'.

**vbnet**

```vbnet
C1FlexReport1.DataSource.Filter = "EmployeeID = 2"
```

**csharp**

```csharp
c1FlexReport1.DataSource.Filter = "EmployeeID = 2"; 
```

Run the project. You see that the First name, Last name, Title, and Notes for the employee with EmployeeID = 2 is displayed.

![Filtering Data in FlexReport](https://cdn.mescius.io/document-site-files/images/fd2ea167-30cb-4938-9938-b740a5b4dd95/imagesext/filtering.png)