dmcnair81
dmcnair81

Reputation: 37

SSRS: Conditionally change font color of certain items of a textbox

I've searched for an answer to this issue before, and found another way to get what I needed, but was curious if this was actually a possibility. Is there a way to change the font color of a single word in a textbox when the word is part of an expression? I know that if you have a text box with the words "This is red" then you could highlight the word red, and change the font color that way, but when you are using an expression to generate the text, you really don't get that option. Is this maybe doable using custom code?

Upvotes: 1

Views: 2033

Answers (1)

Jamie F
Jamie F

Reputation: 23809

This can be done in two different ways:

  • Break the text up into multiple placeholders. You can control the color of each placeholder independently. A textbox can contain as many placeholders as you like.
  • place the formatting in-line as HTML codes such as "This can have one word in <span style='color:red'>red</span>."

Upvotes: 1

Related Questions