# Filter Data

Get started with FlexReport, a WinForms control, which is a fast-paced reporting engine that enables you to create, preview, export and print modern and dynamic reports for all your applications. See more in documentation 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/wpf/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/wpf/online-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'.

```csharp
//Filter the employee detail corresponding to the EmployeeID = 2
rep.DataSource.Filter="EmployeeID = 2";
```

Run the project. The First name, Last name, Title, and Notes for the employee with EmployeeID = 2 is displayed in the output.
![](https://cdn.mescius.io/document-site-files/images/96483bc4-d0db-40fa-a0e4-c5e6a4a56825/images/filteringdatainflexreport.png)