SSRS Comma Delimited string to display on newline

MikeTWebb picture MikeTWebb · Jul 21, 2014 · Viewed 7.4k times · Source

I have a Report in SSRS 2008. One of the columns contains a comma delimited set of values. An example cell displays:

Sting1, String2, String3

I would like to display these values in the cell on new lines:

String1
String2
String3

I've tried replacing the "," with "<br/>" and using HTML and then referencing HTML Decode but couldn't manage to get that to work.

I've also tried replacing the "," with "\r\n" and displaying but could not get that to work either.

Any ideas?

Answer

MikeTWebb picture MikeTWebb · Jul 21, 2014

Found an answer. In the Expression for the TextBox for the cell in the Tablix:

=Fields!YourColumn.Value.ToString().Replace(",",vbCrLf)

The VB Carriage Return Line Feed displays the values on separate lines