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.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
"Michael" <Michael@.discussions.microsoft.com> wrote in message
news:D5216804-6889-483A-BBB5-BC10BACEBB52@.microsoft.com...
>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.
>|||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?
"Bruce L-C [MVP]" wrote:
> 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
>
> "Michael" <Michael@.discussions.microsoft.com> wrote in message
> news:D5216804-6889-483A-BBB5-BC10BACEBB52@.microsoft.com...
> >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.
> >
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment