SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

SSRS reading linebreak in textbox

The problem of the day: I stumbled on this problem on the Microsoft Reporting Services Forum website and thought it might be of some interest.

The problem

"We are loading data from a single data element into a textbox that can contain html linebreak tags (<br />). Is there a way for reporting services textbox to read this and insert line breaks so that it displays as paragraphs? Is the textbox capable of acting on any character codes (as in a rich textbox)? Do I have any workaround options? Am I going to have to change the app to save the data to multiple records just to be able to display the data to multiple textboxes so that it shows as multiple paragraphs? "
My Solution
A quick one..
Are you loading this by utilizing as Visual Studio application.
If so what I would suggest is to replace the <BR/ > with a chr(13).
i.e. The cat and the big black dog <BR/>
   String mystring =  "The cat and the big black dog " +  chr(13) ;

Please give this a try and let me know how you fare.

Should you wish to get hold of me njm870t@hotmail.com or ssimon@statestreet.com

sincerest regards 
Steve Simon     


Posted by Graham O'Daniel on 13 January 2010

I think to be safest you should replace <BR/> with CHR(13) + CHR(10) to be a true CRLF.



Leave a Comment

Please register or log in to leave a comment.