0

I am currently upgrading reports from SSRS 2008 R2 to SSRS 2014. I originally opened the reports from 2008 R2 and then saved them to 2014. This worked fine for all the reports...except one.

All the reports I am upgrading are being emailed as MHTML through subscriptions. Everything works in SSRS 2014 except for one report that is being emailed as text (it really looks like a one column HTML table with no formatting or anything). This problematic report has multiple columns of which one is a text field showing comments from a user. Sometimes this comments field can get really big.

As a test, I decided to eliminate the comments field from the report and email the report to myself as MHTML. This worked successfully. There is something about the comments field that is preventing the email from being sent as MHTML. I thought it might be a size issue so I only showed the first 500 characters of the comment and the email was sent as text again instead of MHTML.

Morpheus
  • 1,616
  • 1
  • 21
  • 31
BrookeM
  • 11
  • 3
  • You should take a representative sample of comments and try generate the MHTML again. It can help you to determine if possible character are avoiding MHTML be generated correctly. Also check for **actions** or expressions evaluated as HTML code in the report. – alejandro zuleta Oct 27 '15 at 19:00
  • Were you able to run the old report to determine if the issue was with the updated report or if it's data that's corrupting the MHTML? – Hannover Fist Oct 27 '15 at 22:59
  • Thanks everyone for chiming in so far. I do not feel it is data related because the exact same report pulling the exact same data in the comments field works fine with MHTML in SSRS 2008 R2. It just doesn't work in SSRS 2014 for some reason. I wasn't sure if I was missing a configuration setting or what. Maybe I uncovered some type of bug? – BrookeM Oct 29 '15 at 14:29

1 Answers1

1

It could be special characters in the comments making the email not regard it as valid HTML and reverting back to text. Try HTML encoding the comments field.

First, add System.Web to your report properties references tab, then make the cell's Value expression be:

=System.Web.HttpUtility.HTMLEncode(Fields!Comments.Value)
Chris Latta
  • 20,316
  • 4
  • 62
  • 70