locked
Is there an Equivalent to Lookup in SSRS 2008 (NOT R2)? RRS feed

  • Question

  • What did people do before "Lookup" was introduced in SSRS 2008 R2!? :)  Seriously, I"m new to the game and am cutting my teeth on R2 (it's what 'they' installed locally), but our production server is not R2, just plain ole' 2008.  I'm using a lookup function that works perfectly well locally - I can use the Preview function to see it with no issues; but when I try to deploy I get the following error message:

    The BackgroundColor expression for the text box ‘Non_Verbal_Age’ refers to the field ‘Non_Verbal_Age_Avg’.  Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope.

    My data is coming from Analysis Services, and I have two queries in the report coming from two different cube.  The first cube displays class averages, and the second cube displays individual student information.  I'm trying to do the following lookup in the Fill property to see where the current student's test result is in regards to the class avg, and then color code it to reflect that:

    =iif(Fields!Ap_Classes.Value, "khaki", 
    iif(Fields!Non_Verbal_Age.Value >= (Lookup(Fields!Location.Value, Fields!Location.Value, Fields!Non_Verbal_Age_Avg.Value, "apStats") - 1), "LightGreen", 
    iif(Fields!Non_Verbal_Age.Value >= (Lookup(Fields!Location.Value, Fields!Location.Value, Fields!Non_Verbal_Age_Avg.Value, "apStats") - 2), "Yellow", 
    "No Color")))

    So how would this have been accomplished in SSRS 2008, before the Lookup function came along?


    Monday, October 29, 2012 2:11 PM

Answers