Two datasets in one table (SSRS)

Using “Lookup” function in SSRS you can combine data from two datasets in one table.

Function syntax as follows:

Lookup(source_expression, destination_expression, result_expression, dataset)

where:

source_expression – key field from table dataset

destination_expression – key field from other dataset (values in source_expression and destination_expression must be equal to map datasets)

result_expression – field from other dataset which we want to show

dataset – dataset from which we want to gather additional data

eg.:

We have SSRS table (dataset name Customer):

Bez tytułu

And two datasets:

Bez tytułu

We want to show Name from Contact dataset which is linked with Customer via CustomerId field. Expression in Contact field in table should look like:

Lookup(Id, CustomerId, Name, Contact)

Bez tytułu

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s