Symptoms
Consider the following scenario:
-
On a SharePoint site or in Report Manager, you select a Reporting Services report.
-
The report contains a text box in which the HTML option of Interpret HTML Tags as Styles is selected.
When you try to export the report to an Excel workbook, the operation is unsuccessful. Additionally, the following error is logged in the Reporting Services log:
Server Error in '/Reports' Application.
Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.This error is also logged in the Reporting Services log:
Reportrendering!ReportServer_0-2!614!Date time:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: , Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelGenerator.OXML.FatalException: Excel Rendering Extension : Argument is not valid.
at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.Model.XMLFontRunModel.set_Name(String value) at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.Model.XMLFontRunModel.SetFont(XMLFontModel font) at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.RichTextInfo.Commit(Style cellStyle) at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.OpenXmlGenerator.FinalizeCell() at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.OpenXmlGenerator.SetColumnContext(Int32 columnIndex) at Microsoft.ReportingServices.Rendering.ExcelRenderer.Layout.LayoutEngine.RenderPageToExcel(IExcelGenerator excel, String key, Dictionary`2 sharedBorderCache, Dictionary`2 sharedImageCache) at Microsoft.ReportingServices.Rendering.ExcelRenderer.MainEngine.RenderRPLPage(RPLReport report, Boolean headerInBody, Boolean suppressOutlines) at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream) --- End of inner exception stack trace ---
Cause
This issue occurs in the Excel Renderer during parameter validation in the OXML writer. Specifically, this issue occurs if the name of a font in a text box that's HTML-formatted and that includes font instructions for each text run is longer than 31 characters.
Resolution
This issue is fixed in the following cumulative updates for SQL Server:
Cumulative Update 2 for SQL Server 2016 SP1
Cumulative Update 4 for SQL Server 2016 Cumulative update 3 for SQL Server 2014 SP2 Cumulative update 10 for SQL Server 2014 SP1
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Latest cumulative update for SQL Server 2016
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
Learn about the terminology that Microsoft uses to describe software updates.