none
SSRS 2005 Background color of a matrix value taken from another field

    Question

  • Ok, so here a sample of a dataset I’m try to report on a matrix.  The Code field represents the row, MonthYear the column and the value is the detail data.  Now I want to apply the colour to the background of the data cells.

    So in the backgroundColor property of the value textbox, I put in  

    =First(Fields!Colour.Value, "datasetname")

    Can anyone please tell me what I am doing wrong? I believe this would work in the 2008 versions. 

    Code

    MonthYear

    Value

    colour

    16

    Apr-13

    NULL

    grey

    23

    May-13

    NULL

    yellow

    5

    Jun-13

    0.97

    green

    6

    Jul-13

    0.97

    green

    7

    Aug-13

    1

    green

    1

    Sep-13

    0.1275

    white

    Aku


    Aku

    Thursday, July 25, 2013 3:09 PM

Answers

  • First thing to check is that your tablix is associated with your data set this can be done by going to the tablix's properties and verifying the Data set Name field which should be your data set.

    If this is verified then what you need to do is to edit the background expression of the "Value" textbox which will be exactly this =Fields!Colour.Value.

    Last but not least you probably want to ensure that the actual values of the Colour column are valid color names, if not you will generate an error. 


    • Edited by EitanRosenzvaig Thursday, July 25, 2013 6:46 PM typo
    • Marked as answer by AkuYali Friday, July 26, 2013 9:05 AM
    Thursday, July 25, 2013 6:43 PM

All replies

  • First thing to check is that your tablix is associated with your data set this can be done by going to the tablix's properties and verifying the Data set Name field which should be your data set.

    If this is verified then what you need to do is to edit the background expression of the "Value" textbox which will be exactly this =Fields!Colour.Value.

    Last but not least you probably want to ensure that the actual values of the Colour column are valid color names, if not you will generate an error. 


    • Edited by EitanRosenzvaig Thursday, July 25, 2013 6:46 PM typo
    • Marked as answer by AkuYali Friday, July 26, 2013 9:05 AM
    Thursday, July 25, 2013 6:43 PM
  • Fantabulous! EitanRosenzvaig

    It seems so simple now, I was going mad yesterday.

    Thank you J

    Aku


    Aku

    Friday, July 26, 2013 9:04 AM
  • Fantabulous! EitanRosenzvaig

    It seems so simple now, I was going mad yesterday.

    Thank you J

    Aku


    Aku

    Friday, July 26, 2013 9:05 AM