FlexReport for WinForms | ComponentOne
In This Topic
    Filtering 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'.

    C1FlexReport1.DataSource.Filter = "EmployeeID = 2"
    
    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