AspUser7724
AspUser7724

Reputation: 109

SSRS populate column of one dataset from another dataset

I'm new to SSRS so I'm not sure if it's possible to do what I'm trying to do.

I have a tablix that is populated using Dataset1. One column of the tablix I'd like to populate using Dataset2. Dataset2 just returns a value based on a parameter passed in from the Dataset1 row.

I've tried using a report parameter, however, it seems to always populate the column value the same for all the rows.

Example:

Table is bound to Dataset1 that returns a bunch of car information along with a car id.

Dataset2 needs to take in the car id and it returns a value:

Select amount from carTable where id = [id passed in]

I need the value returned stored in the table populated by Dataset1. Both datasets use different datasources and that is why I need to do it like this.

Upvotes: 0

Views: 623

Answers (1)

Harry
Harry

Reputation: 2941

From your comment.. displaying the value is simple enough.

If your second dataset is returning only one value and you want to display that in your tablix.. you simply need to aggregate it and specify the dataset name..

Assuming your dataset 2 is called Dataset2 and the column returned is called column

use the following in your tablix :

=max(Fields!column.value,"Dataset2") 

you can use max, min, fist..

Upvotes: 0

Related Questions