Wednesday, January 20, 2010

Reporting services: show value with line breaks between words

I need to display value as a list separated with coma and line break.


I found great tip, how to realize line breaks in reporting services here:
http://www.kodyaz.com/articles/reporting-services-add-line-break-between-words-custom-code.aspx

very helpful custom code function:

Public Function AddLineBreakBetweenWords(words As String) As String
Dim rsRegEx as System.Text.RegularExpressions.Regex = new System.Text.RegularExpressions.Regex("\s+")
words = rsRegEx.Replace(words, " ")
return words.Replace(" ", vbCrLf).Trim()
End Function
 
 
 

No comments:

Post a Comment