none
The definition of the report '' is invalid RRS feed

  • Question

  • hi Team,

    when we are trying to load the report in the report viewer (RDLC) we are getting the below exception intermittently. we are getting message as 'The definition of the report '' is invalid' and there is no report name in the exception too.

    message:

    • invalid signature

    source: mscorlib

    targetsite: Void WinIOError(Int32, System.String)

    stacktype: System.IO.IOException

    stacktrace:

    • at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    • at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    • at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
    • at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
    • at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
    • at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension)
    • at System.CodeDom.Compiler.CodeCompiler.FromDomBatch(CompilerParameters options, CodeCompileUnit[] ea)
    • at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDomBatch(CompilerParameters options, CodeCompileUnit[] ea)
    • at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromDom(CompilerParameters options, CodeCompileUnit[] compilationUnits)
    • at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.InternalCompile(AppDomain compilationTempAppDomain, Boolean refusePermissions)
    • at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.<>c__DisplayClass1.<Compile>b__0()
    • at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1.<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)
    • at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.Phase3(ParameterInfoCollection& parameters, Dictionary`2& groupingExprCountAtScope)
    • at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, RdlUpgradeState upgradeState, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
    • at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.CreateIntermediateFormat(Byte[] definition, 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, IDataProtection dataProtection, 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, IDataProtection dataProtection)

    It would be great if you assist us in the above mentioned issue.

    Thank you in advance!

    Tuesday, March 5, 2019 2:51 PM

All replies

  • Hi Konda,

    Welcome to MSDN forum.

    Based on my research, the exception “The definition of the report is invalid” often means you lack the nuget package which is called  Microsoft.ReportingServices.ReportViewerControl.Winforms in your project.

    You can right-click References and select Manage Nuget Packages.You can download it under the browse.


    If it persists or you have other updated information , please feel free to contact us. Look forward for your reply.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, March 6, 2019 10:43 AM
  • hi Dylan,

    thank you for the response.

    we have tried this solution but still we are facing the same issue.

    It would be great if you share any other suggestion

    Regards,

    Swarna.

    Thursday, March 7, 2019 11:20 AM
  • Hi Swarna,

    Thank you for your reply.

    Did you have a try to create a new project with report viewer?

    If this exception still occurs, could you provide a simple sample with us? And we will try our best to give you a solution.

    Look forward for your reply.

    Best Regards

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, March 8, 2019 9:50 AM