How to filter one dataset value with another dataset Table value in SSRS

后端 未结 2 631
迷失自我
迷失自我 2021-02-20 00:33

How to filter one dataset table with another dataset Table value in SSRS.

2条回答
  •  臣服心动
    2021-02-20 00:38

    Not sure if there is a better way to do this in SSRS 2005, but this should work:

    1. Create dataset A. This will be your filter dataset. You should return only one value column. (If you need multiple values, you'll have to join them)
    2. Create a new report parameter called ParameterA. Set both the available values and the default values to the value column result from the dataset A. Set the parameter to Hidden (I think Internal might be a better choice..try it out)
    3. Create a second dataset B. Add ParameterA as a parameter to dataset B, called @parameterA.
    4. In your query, use the parameter like this:

    SELECT blah blah WHERE valueColumn IN (@parameterA)

    This should do what you're looking for. It's not pretty, but it should work.

提交回复
热议问题