SQLTeam.com | Weblogs | Forums

Rich Text Conversion in SSRS 2014

sql2014

#1

I have a report that I downloaded from Microsoft to do some reporting on Lync 2013, which is stored in a SQL Server 2014 Database on our network. One of the fields is defined by the following expression:

=SWITCH(Fields!ContentType.Value = "text/rtf",Code.ConvertRtfToTextRegex(Fields!Body.Value), Fields!ContentType.Value = "text/plain",Fields!Body.Value, Fields!ContentType.Value = "text/html",System.Text.RegularExpressions.Regex.Replace(Fields!Body.Value, "<[^>]+>", ""), Fields!ContentType.Value <> "", Fields!Body.Value )

Wherever there is a crazy character (i.e. emoticon), there is a placeholder that never gets stripped out that reads "generator Riched20". I've tried modifying this expression by either using a different conversion (i.e. into HTML, since I've read that SSRS does better with HTML than RTF), or by attempting to add to the expression to ad something to replace all instances of that string with "". I have had no success- the conversion itself shows raw HTML, and when I try to add the replacement, either inline with the existing replacement or by appending the statement, I get #Error in the field value.

I am not an experienced report programmer- I understand the simple stuff, but the complexity of this code is beyond me. Can anyone suggest modifications to the above code so I do not end up with the "generator Riched20" text?
Thanks in advance- I really appreciate your help.