An error occurred during rendering of the report, InvalidXmlChar, RRS feed

  • Question

  • Guys,

    I'm tearing my hair out over a problem with SSRS, allow me to explain, hopefully somebody can help.

    I have a report which is calling a stored procedure, the procedure is pretty simple - no paramaters or anything fancy, just a bog standard select, returning about 150,000 rows of data. I can run this report and save the output to CSV or XML just fine, I can also create subscriptions to achieve the same thing.

    I've created a new report, in a different folder on the Report Manager, however, it's on the same server, using hte same connection string and using the exact same stored procedure, for some reason it's causing some *real* grief with XML.

    If I run the data off as CSV (realtime) I get a filesize I expect, the same can be said for a subscription to CSV format. If I do this via XML the realtime data file is only partial (like 2-3mb instead of 30mb), if I do this via a subscription it refuses to create the file, giving the error in the subject of this post.

    Looking on the report server in the error log files I can see the following:

    ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.HandledReportRenderingException: An error occurred during rendering of the report.
    at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)

    So, first of all you'd assume there's some dodgy data, however, if an IDENTICAL procedure without any filtering runs off fine to XML that cannot be the case.

    If I look at hte partial files I see the following: "hexadecimal value 0x0B, is an invalid character" - this can be at various places, if I run the file off I get different sizes each time (sometimes to a large degree) despite the fact the data isn't changing much (I can run off CSV files at hte same time to verify the file sizes haven't changed)

    So in a nutshell I'm getting what looks like data issues, however, the same data set runs just fine. I'm wondering if the invalid character thing is actually because SSRS can't create a complete XML file and dies before it completes it?

    At the moment I'm at a loss as to what I can do next to target the source of this problem - any help/feedback/suggestions very greatly received. Thanks in advance.

    Tuesday, October 29, 2013 3:58 PM

All replies

  • Hi Rob-R,

    I feel sorry for the delay. 

    Based on the current description, the issue may occur because the SOAP web service that uses XML 1.0 doesn't support some hexadecimal chars during the serialisation/deserialisation process. If so, we can attempt to add SoapExtension to replace the invalid chars.

    Hope this helps.

    Heidi Duan

    Heidi Duan
    TechNet Community Support

    Friday, November 8, 2013 8:53 AM
  • Hello Heidi,

    Thanks for the reply, I've actually just returned to this task after a break from work. Alas it's still persisting, the last thing we tried was restarting the server Reporting Services 2008 resides on, to no avail. I also tried email subscription as well as fileshare.

    Yesterday I managed to get Reporting Services 2012 running on another server we use for Management, it seems it was installed as part of hte TFS install. With this setup I managed to get the new procedure to run off just fine, it created a pretty hefty XML file of 70mb, it seems strange that the working proc on 2008 delivers 40mb file, but under 2012 delivers a 70mb file. I'm not sure what that proves really as it's 2008 we need to use to be honest.

    I don't fully understand the soap extension side of things, are you able to elaborate please?

    Friday, November 8, 2013 9:14 AM