How to Fix the SSRS Error – Definition of this Report is Not Valid

by | Nov 19, 2020 | ConfigMgr, How-To, SQL Server Reporting Services, Tips

Last updated on January 13th, 2024 at 10:10 am

Leonard and I talk about SSRS and Power BI reporting all of the time. We even publish weekly tips and tricks about reporting on the Ask Garth and distribute a monthly newsletter full of tips. By the way, if you are not signed up for the newsletter, you should be! One of the things that drives us nuts, though, is when we receive the following error message after uploading a new SSRS report (RDL) to a SSRS server aka the ConfigMgr / SCCM Reporting Services Point: 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 ‘https://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition’ which cannot be upgraded. (rsInvalidReportDefinition)

Definition of this Report is Not Valid - Error Message

Now, after seeing this error message enough times, we know how to fix the problem. Heck, Leonard even wrote about something similar in his blog post, Clean and Build – How It Saves Me Money. The trouble is, when we went to tell someone else how to fix it, up until today, we didn’t have a blog post that explained the process, so with today’s post I can cross that “to-do” item off my list.

Definition of this Report is Not Valid

When do you get this error? The answer is really simple. You upload a RDL with a version that isn’t supported by your SSRS server. For example, a SSRS 2016 RDL version is uploaded to a SSRS 2012 server. You can see the version incompatibility information in the error message text itself.

How Does this Happen?

There are two ways. The first one involves someone else (usually outside of your organization) creating an RDL, posting it to their blog site and then you download it. It’s when you upload the report to SSRS that you see the error message. If you are not familiar with how to upload a RDL, make sure to check out my blog post, how to setup an RDL for ConfigMgr?.

The second way involves using either Visual Studio (VS) or Report Builder (RB). When you manually upload the RDL (report) to SSRS, you see the, “Definition of this Report is Not Valid,” error message. Why is it important that I said, “manually,” upload the RDL? If you publish the report directly from VS or RB, the version of SSRS is usually detected automatically and any adjustments are made in the background. In this case, you should never see the error. For more details on deploying for VS see. How to deploy ssrs reports from visual studio to the ssrs server.

Definition of this Report is Not Valid – Solution

There are no tricks to solving this problem. All you need to do is set the RDL to the appropriate version that’s supported by your SSRS server. There is one caveat, however, to this fix. The original RDL version is ALWAYS stored in the project directory as the HIGHEST RDL version supported by VS or RB. Whereas the appropriate (aka downgraded) version is found within the “BIN” project directory.

Note: When I say the “BIN” project directory, it can be BIN or BIN\Debug or BIN\Release. Where it is found depends on many things, but it should be obvious to you in which folder the recently created RDL is stored.

RDL 2016

RDL 2016

Here’s an example of a RDL opened in XML Notepad. Notice that the schema is listed as 2016. This is a RDL from our project directory.

RDL 2008

RDL 2008

The same RDL is opened in XML Notepad, but notice that the schema is listed as 2008. This is the SAME report as the one in the previous example. It was downgraded to 2008 and it’s found within the “BIN” project directory.

How to Downgrade the RDL’s Version

Solution Explorer

In Solution Explorer window, right-click on the project (in this case it is called Microsoft Office) and select Properties.

Definition of this Report is Not Valid - Properties

Again, in the TargetServerVersion drop down, select the appropriate version. In my case it’s SQL Server 2008 (see the purple arrow). Select appropriate version then, click on the OK button. In this example, the “BIN” project directory is named bin\Debug (green arrow).

Wait, Why Isn’t the Solution to Never Manually Upload a RDL from VS or RB?

Well, there is a long answer and a short answer. Here’s the short answer. When you are working on a project, you normally have several reports in different states. If you are careful, you should publish one report at a time from VS or RB. The key word in that last sentence is “careful.” Why? I seem to upload all the reports, regardless of their state, or none of them. This mostly occurs out of habit because I want to prevent overwriting reports I didn’t mean to overwrite. In this case, I always upload my reports manually. As the saying goes, YMMV.

Definition of this Report is Not Valid – Summary

As a report writer it is important to know how to “downgrade” your report in order to support all versions of SSRS that you intend it to support. This is a super-simple solution that allows folks with different SSRS versions to use your reports. If you are a consumer of reports that you “find” on the internet, then you may need to know how to downgrade RDLs to match your SSRS server. Don’t let this error message, “Definition of this Report is Not Valid,” stand in your way!

Let us know how useful this blog post is to you. As always, if you have questions, please feel free to touch base with @SuaresLeonard or me @GarthMJ. Finally, don’t forget that you can subscribe to my RRS feed to stay on top of the latest trips and tricks.