Saturday, 6 April 2013

LOOKUP Function in Sql server Reporting Services-SSRS

How works Lookup in SSRS


I am taking one Emp table and One Dept table like bellow

Emp Table :-    Some Employee have no departments  did is NULL




 

Dept Table:-  Hear 5 departments but matched to Emp table only 4 dept


In Reporting Services I am taking two (2) different sources and two different data sets

Dataset 1 = EMP


 

 
 

Dataset2 : DEPT

 
 

I am using two data sources for each Each dataset individually

      
                
Hear in the Dname level field I am written a lookup expression


LOOKUP Expression:-  Right Click and Go to Expression  and write lookup Expression


Then Click ok and select preview


Hear Display only full rows in employee table and matched rows in Dept table 

In My DEPT Table have 5 Record not matched to Dept  , That Record not display hear

And hear displayed all records in EMP data set

 

 

Thank you J

 Sankar