I'm relying heavily on RDLC reports in my web forms applications. I'm using the latest version through Nuget.
Whenever I'm using a string in the expression builder I receive the following error:
Microsoft.Reporting.WebForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'xxxx.rdlc' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC31424] Type 'System.CodeDom.Compiler.GeneratedCodeAttribute' in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has been forwarded to assembly 'System.Private.CoreLib'. Either a reference to 'System.Private.CoreLib' is missing from your project or the type 'System.CodeDom.Compiler.GeneratedCodeAttribute' is missing from assembly 'System.Private.CoreLib'.’. at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.ParseErrors(CompilerResults results) at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.InternalCompile(AppDomain compilationTempAppDomain, Boolean refusePermissions) at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.<>c__DisplayClass33_0.<Compile>b__0() at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1_0.<Run>b__0(Object state) at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state) at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.Run(ContextBody callback) at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.Compile(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, AppDomain compilationTempAppDomain, Boolean refusePermissions, PublishingVersioning versioning) at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.Phase3(ParameterInfoCollection& parameters, Dictionary`2& groupingExprCountAtScope) at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(PublishingContext reportPublishingContext, PublishingErrorContext errorContext, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext) at Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot) --- End of inner exception stack trace --- at Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot) at Microsoft.Reporting.LocalService.GetCompiledReport(PreviewItemContext itemContext, Boolean rebuild, ControlSnapshot& snapshot) at Microsoft.Reporting.LocalService.CompileReport() at Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession() --- End of inner exception stack trace --- at Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession()
Below are some expressions I tried, they al return the above error message:
="Some text"
="Last update: " & Format(Globals!ExecutionTime,"yyyy-MM-dd")