FlexReport for WPF | ComponentOne
In This Topic
    Filter Data
    In This Topic

    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.

    Lets say you want to view the employee detail corresponding to an Employee ID for the report created in FlexReport Quick Start. Add the following code where EmployeeID field is added in the Detail section, to Filter the employee detail corresponding to the 'EmployeeID = 2'.

    //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.