SQL Server Blogs

Voices from the UK SQL Server Community
Welcome to SQL Server Blogs Sign in | 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:


    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

This Blog


Recent Posts



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