1. Home
  2. Docs
  3. Designing and Running Rep...
  4. Configuring and Using Fil...
  5. Drop Down List Filter

Drop Down List Filter

With .Net Report Builder, your end users can easily select values from a drop down list to filter their Reports, instead of typing in values manually.

To allow selecting from a list, you must setup a Foreign Key when setting up the schema in the database.

For example, if your “Orders” table has an “EmployeeID” field, you would set it up this way in the admin section:

Check the “Foreign Key” option, and then fill out details for the Foreign Table and Join. See example in screenshot below:

NOTE: The Foreign Table must be added to Dotnet Report as well, otherwise you will get an error when the system tries to build the dropdown data.

TIP: If you have hard coded values, like enumerated string value in your table, you can add a Custom Data Table in Dotnet Report using SELECT DISTINCT Value From Table, and then make that the foreign table, with Key and Value fields as the same value.

With the Foreign Key setup , when a user chooses Employee in the Report, they will see the following options in filter:

When the user chooses “=”, they can select one value from the drop down:

When they choose “in”, they can select more than one values in the drop down:

The Report will apply the filter for all selected values from the list.

How can we help?