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

 

15 comments:

  1. i am using lookup set function but my value is repeated
    Example: if I take 2 as stage_id then it will show "FI" multiple times
    my code is like that
    =join(LookupSet(Parameters!sg_stage_id.Value(0),Parameters!sg_stage_id.Value(0), Fields!Stage_name.Value, "DataSet1"),",")

    ReplyDelete
  2. I wish you check the spelling and grammar before publishing on web. Also you could check with your friend or coworker. However your effort was good.

    ReplyDelete
  3. Msbi online training Microsoft business intelligence is delivered via a recognizable and trustworthy surroundings that solves the enterprise needs of organizations of sizes all over the world. Powered by the flexibility and horsepower of Microsoft SQL-Server and produced through the trusted and recognizable 2007 Microsoft Officse program, Microsoft business intelligence alternatives work with each other to supply value to all customers across your organization Msbi online training. Msbi online training
    Contact us:
    India:+91 9949599844
    usa :+1-347-606-2716
    E-mail:contact@smartmindonlinetraining.com

    ReplyDelete
  4. As a trainner i like your post i was Useful and Excellent.
    Khalil

    ReplyDelete
  5. Thanks for sharing this informative blog .To make it easier for you visualizing all the materials about (OBIEE).SO lets Start brightening your future.and using modeling tools how to prepare and build objects and metadata to be used in reports and more trained itself visit obiee Training in Chennai

    ReplyDelete
  6. I would recommend the Qlikview course to anyone interested in learning Business Intelligence .Absolutely professional and engaging training sessions helped me to appreciate and understand the technology better. thank you very much if our dedicated efforts and valuable insights which made it easy for me to understand the concepts taught and more.. qlikview Training in Chennai

    ReplyDelete
  7. Thanks for giving Good Example It are very useful to us.
    Fantastic article, Viral. Very well written, clear and concise. One of the best links explaining one to many and hierarchy Sqlserverdba. Thanks a lot.It is useful to me and my training SqlserverdbaOnline Training

    ReplyDelete
  8. From your discussion I have understood that which will be better for me and which is easy to use. Really, I have liked your brilliant discussion. I will comThis is great helping material for every one visitor. You have done a great responsible person. i want to say thanks owner of this blog.
    python training institute in chennai
    python training in Bangalore
    python training in pune
    python online training

    ReplyDelete
  9. The post is written in very a good manner and it entails many useful information for me. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept.
    Blueprism training in Pune

    Blueprism online training

    Blue Prism Training in Pune

    ReplyDelete
  10. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..

    java training in chennai | java training in bangalore

    java online training | java training in pune

    ReplyDelete
  11. I’ve been using Movable-type on several websites for about a year and am anxious about switching to another platform. I have heard great things about blogengine.net.
    safety course in chennai

    ReplyDelete
  12. Great Blog, there is so much reality written in this content and everything is something which is very hard to be argued. Top notch blog having excellent content. Sharepoint consultants near me

    ReplyDelete