Consider you have a SQL Server Table with some multiline text data. And that data contains carriage return in it.
Now, if you want to display that data with carriage return in SSRS 2005 textbox, there is no direct way to display it.
Because SSRS 2005 uses VB engine to render the data, where it doesn’t understand line feed-->CHR(10) or Carriage Return -->CHR(13) characters.
So, what is the alternative?
Well, simple we need to use the Replace() function available and replace the specific characters with VbCrLf
ex:
=Replace(First(Fields!YourField.Value, "DataSource"),CHR(10),VbCrLf) –>This worked for me.
or
=Replace(First(Fields!YourField.Value, "DataSource"),CHR(13),VbCrLf)
In my case, The user was entering the data into SQL Server Database from an InfoPath form and wanted the carriage return to be persisted in the report. And in this case, CHR(10) worked instead of CHR(13).
Good to see SSRS 2008 added lot of rich text functionality, where you don't have to deal with these kind of silly things..,
Happy Reporting!