Share via


SSRS Tips: Adding Custom Formats Within Textbox Data

Requirement

Is it possible to render only part of a string inside report textbox in green color

Solution

From SQL Reporting Services 2008 R2 onwards this is possible. This is achieved using placeholders in SSRS textbox.
For enabling this select the text inside textbox and choose Placeholder properties as per below

Inside that you need to set the Markup type as HTML as below

Once this is done then you can use any of the basic html tags inside the textbox expression and report viewer will apply corresponding formatting on the text.
As an example we can use a expression as below

="This is an example of sentence with <font color=""green"">green</font> word, a <b>bold</b> word and an <u>underlined word</u> and with following list<ol><li>Green</li><li>Lilac</li><li>Blue</li></ol>"

Now see the html formatted output below

Summary

Using placeholder property setting as HTML we can pass simple html tags in expression and make SSRS render them as HTML output

See Also

MSDN Reference

Reporting Services 2008 Showing