Conditionally HIGHLIGHT a cell font (color=RED, BOLD) based on it's contents

  • In SSRS 2016 Enterprise -- I need to HIGHLIGHT a cell BOLD/RED "IF" it contains the value N (that's the letter "N") otherwise leave the cell as normal, black.

    How do I do this? thx for any help here!

    BT
  • Put an expression in the relevant properties of the text box. Use an IIF to check the value and return the appropriate value(s).

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • thx for the quick reply.  When I look at my txt box properties (text box is named [Active]), I right mouse click, then click fx Expression, I see:  =Fields!Active.Value

    What syntax would I use to allow this to RED/BOLD this text box IF it contained the value: N

    (sorry, somewhat new to this feature..)

    BT
  • If you right click the text box and select expression you're setting the expression for the value of the textbox, not its properties. You need to be in the properties of the textbox to amend the properties of it (surprise! 🙂 ). So, for example, for bold the expression would be:
    =IIf(Fields!Active.Value = "N", "Bold", "Normal")

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • I

    I think the OP needs to set the properties not the content.
    Select the textbox/cellm then in the properties pane click the down arrow for color and select expression to enter the expression to set the text color
    Repeat for font/fontweight

    Scrub that, misread Thom's post, my bad :blush:

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Thom A - Thursday, May 24, 2018 7:30 AM

    If you right click the text box and select expression you're setting the expression for the value of the textbox, not its properties. You need to be in the properties of the textbox to amend the properties of it (surprise! 🙂 ). So, for example, for bold the expression would be:
    =IIf(Fields!Active.Value = "N", "Bold", "Normal")

    And in addition, a similar expression will be needed for the Font Color property.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 6 posts - 1 through 5 (of 5 total)

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