DefinitionInvalidException: The definition of the report '' is invalid
Asked Answered
C

4

9

I get the following error in my reportviewer report when I upgraded from Visual Studio 2015 Community to Visual Studio 2017 Community.

Microsoft.Reporting.WinForms.LocalProcessingException: 'An error occurred during local report processing.'

Inner Exception DefinitionInvalidException: The definition of the report '' is invalid.

Colorable answered 9/5, 2017 at 12:5 Comment(2)
What is the full exception? I suspect that some NuGet package is missing, check those.Groats
+ InnerException {"The definition of this report is not valid or supported by this version of Reporting Services. The report definition may have been created with a later version of Reporting Services, or contain content that is not well-formed or not valid based on Reporting Services schemas. Details: The report definition has an invalid target namespace 'schemas.microsoft.com/sqlserver/reporting/2016/01/…' which cannot be upgraded."} System.Exception {Microsoft.ReportingServices.ReportProcessing.ReportProcessingException}Colorable
O
14

Please verify that you have installed the following nuget packages.

For Winforms : https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.Winforms/140.340.80

For ASP.NET : https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.WebForms/140.340.80/

You might also need to install the Report Designer :

https://marketplace.visualstudio.com/items?itemName=SqlReportingServices.MicrosoftRdlcReportDesignerforVisualStudio-18001

If it does not work, click "continue" in Visual Studio debugger when you get the exception and go see on the Web page what are the error details.

Octavia answered 10/5, 2017 at 6:11 Comment(2)
The correct Winforms nuget package was not installed, thank you!Colorable
Always downloaded latest versions of these packagesBaneful
D
4

this error occurred for not installing correct packages. I have solved this problem by installing latest reportviewer control from this link

https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.WebForms/150.900.148
Disbelief answered 12/2, 2019 at 13:9 Comment(0)
S
1

I'm going to add that my cause was that the report definition was indeed invalid.

It had syntax errors in some of the expressions.

fixed the rdlc file and the error disappeared, bit of a red herring but ill add this answer for anyone else still suffering the pain of working with microsoft reporting 2005 in 2021 :D

Stonedeaf answered 26/11, 2021 at 16:8 Comment(0)
S
0

For me, it was installed but I forgot this:

enter image description here

Hope it helps.

Staffordshire answered 11/4, 2018 at 17:20 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.