DefinitionInvalidException: The definition of the

2020-06-04 06:35发布

问题:

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.

回答1:

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.



回答2:

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


回答3:

For me, it was installed but I forgot this:

Hope it helps.