Font Color Expression

  • Hi,

    I want change the font color of ((50 40 10 ))based on the below...

    Below will display the total devices as

    100 (50 40 10 )

    How can I change the 50 to Red , 40 to Orange and 10 to green

    The text box expression is :

    =COUNT(Fields!deviceColor.Value) &"(" & SUM(IIF(Fields!deviceColor.Value = "Red",1,0)) & " " & SUM(IIF(Fields!deviceColor.Value = "Amber",1,0)) & " " & SUM(IIF(Fields!deviceColor.Value = "Green",1,0)) &")"

    What should the font color expression be?Any suggestions...

  • This looks like a matrix or tablix from your description. Could you post some sample data so we can mock up what you're working with? It's just really hard to tell what's in a cell by itself and what isn't, so either I'm missing something or there's not enough information here to answer your question. I know for sure you can apply formatting to a text string with field values in it, but you can't concatenate them, I don't think.

    Just mock up even a simplified dataset that's representative of your problem, and create a matrix/tablix and explain what cells should be highlighted.

  • Sure . So I have this column called Device color and say this is the data

    DeviceColor

    Red

    Red

    Red

    Red

    Red

    Red

    Red

    Red

    Red

    Amber

    Amber

    Amber

    Amber

    Amber

    Amber

    Green

    Green

    Green

    So the expression

    COUNT(Fields!deviceColor.Value) &"(" & SUM(IIF(Fields!deviceColor.Value = "Red",1,0)) & " " & SUM(IIF(Fields!deviceColor.Value = "Amber",1,0)) & " " & SUM(IIF(Fields!deviceColor.Value = "Green",1,0)) &")"

    will return

    18 (9 6 3) in the ext box. Now I want to show 18 in Red font, 6 in Amber/Orange and 3 in Green.

    Is that possible ? Any ideas

  • Typo it should be 9 in Red 6 in AMber/Orange and 3 in green

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply