locked
Search in SSRS dataset or SSRS table for a specific value RRS feed

  • Question

  • I have two tables in my SSRS report which are having one common column say Employee Name.

    Now in my second table I want to change the color Employee Name value if  this values exists in the first column.

    I tried to find something to search in a Dataset of first table or table itseld with the second table column, I did not find any solution.

    First Table

    Employee ID Employee Name Sal

    1 Sanjeev 2000

    2 Kumar 10000

    Second Table

    Employee ID Employee Name Location

    1 Sanjeev HYD

    3 Ravi Mumbai

    I wanted to highlight Sanjeev in the second table as it appeared in the first table.

    Please give me a solution.


    Sanjay

    Friday, December 6, 2013 8:36 AM

Answers

  • Hi 

    You can use the lookup function to do this, the lookup function will return the matching id value from table 1.

    The lookup function is made up of the following :

    Lookup(source_expression, destination_expression, result_expression, dataset)

    the conditional expression for formatting the colour will be as follows:

    =iif(Fields!Employee_ID.Value = (Lookup(Fields!Employee_ID.Value, Fields!Employee_ID.Value, Fields!Employee_ID.Value, "table_1")), "Red", "Transparent")


    Friday, December 6, 2013 10:34 AM

All replies

  • For the second dataset join to the first in the query and return a flag to say if the entry is present and set the colour based on that.
    Friday, December 6, 2013 8:42 AM
  • Hi 

    You can use the lookup function to do this, the lookup function will return the matching id value from table 1.

    The lookup function is made up of the following :

    Lookup(source_expression, destination_expression, result_expression, dataset)

    the conditional expression for formatting the colour will be as follows:

    =iif(Fields!Employee_ID.Value = (Lookup(Fields!Employee_ID.Value, Fields!Employee_ID.Value, Fields!Employee_ID.Value, "table_1")), "Red", "Transparent")


    Friday, December 6, 2013 10:34 AM