Groups | Blog | Home
all groups > sql server reporting services > february 2006 >

sql server reporting services : Displaying HTML as text


Michael
2/27/2006 2:27:21 PM
I am trying to display a field in a report that sometimes contains html
stored as text. I want to be able to strip out the html tags so I can display
the text only in the report.
Bruce L-C [MVP]
2/28/2006 8:46:22 AM
To strip off the html I believe there is a framework function that you could
use. Set the value of the textbox to an expression like this:

= Code.StripHTML(Fields!Fieldname.value)

You would write the function StripHTML that would return the value with the
html stripped.

This link shows how to do this using regular expressions.

http://weblogs.asp.net/rosherove/archive/2003/05/13/6963.aspx

There is definitely a dotnet function that you could use too. Google on
stripping html and you should be able to find it.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services


[quoted text, click to view]

Michael
3/2/2006 6:23:27 PM
Thanks for the info Bruce. I am not a programmer so forgive for my questions,
how do you embed custom code into a sql report?

[quoted text, click to view]
AddThis Social Bookmark Button