views:

2324

answers:

2

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

+2  A: 

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.

Dave Bauman
I think you can clean this description up a bit, but with some fumbling around, it works great.
DevelopingChris
A: 

hey buddy... i have a different kind of question. i want a value from one dataset to be as a column in another dataset not in where clause. like i want select @shipto,adress,city from is1002 where customerno = @customerno and adrcd=@adrcd

i want the @shipto value to change every time @adrcd value changes

how can i do that?

abhi