Caffeinated
Caffeinated

Reputation: 12484

Can a single parameter value have multiple possible values?

I am trying to create a specific value in a SSRS parameter that is composed of multiple possible values.

Because in the back-end, each of these Label-value pairs can have multpile possible values.

I wanted to see if i could use a temp -table with those values hard-coded, but not sure how

enter image description here

Upvotes: 1

Views: 219

Answers (1)

Jeroen
Jeroen

Reputation: 63830

Sounds to me like an XY-problem, and I would strongly suggest looking into the following two alternatives to the solution you're aiming for:

  • If those values (30, 35, 36, and 40) have a shared meaning, consider normalizing them in a table in your database, and having the value for SecurityDrops correspond to that group of values (e.g. through the foreign key).
  • Use a magic value such as "-1" and have the query define an exception for that situation.
  • Use a magic value such as "-1" for SecurityDrops, and if it is selected have another parameter pop up for SecurityDropValues that is MultiValued and allows the user to input 30, 35, 26, and 40.

If you insist on the direction you suggest in the question, the "solution" would be to make the parameter of type text, and allow the user to input comma-seperated values. You'll have to parse the input for the parameter in the SQL then though, which isn't pretty.

Upvotes: 3

Related Questions