Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS Comma Delimited string to display on newline

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?

like image 255
MikeTWebb Avatar asked Jul 21 '14 15:07

MikeTWebb


1 Answers

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

like image 59
MikeTWebb Avatar answered Oct 15 '22 06:10

MikeTWebb