SQL Server Blogs

Voices from the UK SQL Server Community
Welcome to SQL Server Blogs Sign in | Join | Help
in Search

Robbert Visscher's Microsoft Business Intelligence Blog [Macaw]

[SSRS] Strip HTML Code

To strip de HTML code in a SSRS report you can use the following Function:

Public

FUNCTION RemoveHtml(ByVal Text As String) AS String

IF Text IsNot Nothing Then

Dim objRegExp AS NEW System.Text.RegularExpressions.Regex("<(.|\n)+?>") 

RETURN objRegExp.Replace(Text, "")

END IF

END Function

1.       Go to your report. Click Report à Report Properties

 2.       Paste the code (In the beginning of this article) into the Code tab.

 

3.       Now you can use the RemoveHtml function in your textbox with an expression.

 Note. The function will not be recognized by SSRS en will be underlined in red

Published Oct 19 2009, 02:51 PM by Robbertvisscher
Filed under:

Comments

No Comments

This Blog

Syndication

Recent Posts

Tags

Archives

Powered by Community Server (Commercial Edition), by Telligent Systems