We are using ReportViewer in Local mode to render PDFs. This has been working fine for a long time - the last change of any kind to the report or program was early in 2012.
As of Tuesday, the report works fine for a while, then starts getting the above error. Once we start getting the error, the report does not work at all. Full trace is:
Server Error in '/' Application.
An unexpected error occurred while compiling expressions. Native compiler return value: ‘-1073741502’.
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘-1073741502’. Source Error:
|
Stack Trace:
[ReportProcessingException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘-1073741502’.] Microsoft.ReportingServices.ReportProcessing.ReportPublishing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks) +417 Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions) +728 Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot) +323 [DefinitionInvalidException: The definition of the report 'Main Report' is invalid.] Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot) +559 Microsoft.Reporting.StoredReport.CompileReport() +97 Microsoft.Reporting.StoredReport.get_Snapshot() +45 Microsoft.Reporting.StandalonePreviewStore.GetCompiledReport(CatalogItemContext context, Boolean rebuild, ReportSnapshotBase& snapshot) +482 Microsoft.Reporting.LocalService.GetCompiledReport(CatalogItemContext itemContext, Boolean rebuild, ReportSnapshotBase& snapshot) +38 Microsoft.Reporting.LocalService.CompileReport(CatalogItemContext itemContext, Boolean rebuild) +31 Microsoft.Reporting.WebForms.LocalReport.CompileReport() +162 [LocalProcessingException: An error occurred during local report processing.] Microsoft.Reporting.WebForms.LocalReport.CompileReport() +606 Microsoft.Reporting.WebForms.LocalReport.SetParameters(IEnumerable`1 parameters) +63 _Default.addCommonReportParameters() +1461 _Default.getReportGirlsUnder24() +2605 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42 System.Web.UI.Control.OnLoad(EventArgs e) +132 System.Web.UI.Control.LoadRecursive() +66 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428 |
If I make a change to Web.config, then change it back, this will clear the error, however we need the application to continue to work without this intervention.
Our Web.config specifies version 9 of the report viewer:
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
Please advise.