Tran Tran
Tran Tran

Reputation: 39

How to create a dropdown filter list in SSRS?

I would like to create a drop down filter list based on Region column in my table. I create a parameter by query like this:

enter image description here

I set up parameter to get the values from region column.

enter image description here

However, I got the error like this:

The report parameter 'region' has a DefaultValue or a ValidValue that depends on the report parameter "region". Forward dependencies are not valid.

The definition of the report '' is invalid.

An error occurred during local report processing.

Upvotes: 0

Views: 3929

Answers (1)

Deirdre O'Leary
Deirdre O'Leary

Reputation: 450

You need to create a second dataset in your report to provide the list of regions to the drop-down list, for example:

SELECT DISTINCT [region]
FROM [table]
ORDER BY [region];

In the available values for the parameter, set the Dataset to this new dataset, & the Value & Label fields to the [region] column.

See this tutorial for more info: https://learn.microsoft.com/en-us/sql/reporting-services/tutorial-add-a-parameter-to-your-report-report-builder?view=sql-server-ver15#AddDataset

Upvotes: 1

Related Questions