1
votes

I made a report in Visual studio 2017 that produce an error in VS 2013 and VS 2015:

Error 119 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 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' which cannot be upgraded. F:\Projects\Win Applications\ERP\ERP\DiERP\bin\Debug\Reports\Inventory\Ar280.rdlc DiERP

so is there a way to make reports in VS 2017 compatible with earlier versions of VS.

I opened the file in a text editor and changed: http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition

to

http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition

but it doesn't work in VS:

One or more errors encountered while loading the designer. The errors are listed below.

Deserialization failed: The element 'Report' in namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' has invalid child element 'ReportSections' in namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'. List of possible elements expected: 'Description, Author, AutoRefresh, DataSources, DataSets, Body, ReportParameters, Code, Width, Page, EmbeddedImages, Language, CodeModules, Classes, CustomProperties, Variables, DeferVariableEvaluation, ConsumeContainerWhitespace, DataTransform, DataSchema, DataElementName, DataElementStyle' in namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' as well as any element in namespace '##other'. Line 115, position 4.

2
I'm not sure this is about the version of VS- the schema used in a report is down to the version of SSRS you are using. What is the target server version saying when you look at the report project's properties? What is the version of SQL Server you are targetting?Rich
What report project? I simply add a *.rdlc file to the exe project. and I didn't have a dedicated project for reports , and I didn't find the option for TargetServerVersion in the properties of that project (my google search refer to that setting as a solution for the problem but I can't ind it!)mshwf
Your question and tag said SSRS, which comes with SQL Server, rather than the 'local report' that is an RDLC file. I don't know if it is possible to downgrade a more recent RDLC file to an old VS, but you could try looking in to updating your Report Viewer/Report Designer within VS 2015.Rich
It looks like this should be done in VS 2015. blogs.msdn.microsoft.com/sqlrsteamblog/2017/07/27/…Rich
Can you glance this link Visit stackoverflow.com/questions/35922626/…yusuf hayırsever

2 Answers

2
votes

Many have answered various permutations of this question by telling people to edit headers of old RDLC reports as you have. This is a horrible idea. Generally, this issue materializes because you are using an version of the Microsoft.ReportingServices.ReportViewerControl.WebForms dll that is not compatible with the Sql Server/ Sql server lite that you are trying to run the report due to:

  1. Upgrading versions of visual studio and are using the newer report template with the older .dll
  2. Pulling code from a repository that was developed by someone using an older version of the .dll and you are editing it in a newer version of visual studio
  3. Creating a report in a higher version of visual studio with the newer .dll (as you have) and trying to render it with the older version of the .dll.

The solution is to upgrade the version of the .dll through nuget. Visual Studio 2017 requires version 140.xxx.xx (which is compatible with Sql Server 2016 and previous versions) in the project that renders the report and make sure that everyone who is contributing to your repository is upgraded. Look for Microsoft.ReportingServices.ReportViewerControl.WebForms.140.340.80 - the .dll should be backwards compatible with older versions of sql server (haven't tested it, though).

-2
votes

Follow this answer Downgrad from RDL 2016 and remember if you make any changes in report after downgrade it will revert again to 2016

https://stackoverflow.com/a/37548615/3332105