Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS how to render HTML escaped character

I am trying to render a column which has lots of HTML escaped characters, such as &#0945 for alpha, &#0946 for beta. I use SSRS 2012's placeholder property to render it as HTML markup type. This feature looks like only works with HMTL tags, not escaped characters. Any feedback appreciated.

like image 209
bigapple99 Avatar asked May 27 '13 01:05

bigapple99


1 Answers

Right-click on the non-design surface of your report and click Report Properties.... Click the References option, click Add in Add or remove assemblies and add System.Web from the .NET options.

Click the Code option and add the following code:

Function Decode(ByVal EncodedString AS String) AS String
  Return System.Web.HttpUtility.HTMLDecode(EncodedString)
End Function

For your field value, use the expression:

=Code.Decode(Fields!MyField.Value)
like image 95
Chris Latta Avatar answered Oct 24 '22 22:10

Chris Latta