0

I'm getting the following error when publishing a report from the command line using the report scripting tool:

System.Web.Services.Protocols.SoapException: 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

There are other questions regarding this error and the solution always seems to be to either install SQL Server 2016 or to change my reports project to output for 2014. This does, in fact, work but it shouldn't be necessary. My SQL Server version is 13.0.4446.0, which is 2016. Furthermore, I can publish just fine from within VS with it set to 2016.

Anyone know what's causing this?

ViKiNG
  • 1,294
  • 2
  • 19
  • 26
C. Williamson
  • 319
  • 3
  • 13
  • See if [this](https://stackoverflow.com/a/39192968/6490059) helps. – SMM Oct 16 '17 at 12:18
  • I'm already pulling from the bin directory. That doesn't seem to be the problem. – C. Williamson Oct 16 '17 at 18:20
  • You need to set your output server to match you SQL version. It may not seem necessary but it is because the underlying XML definitions have changed a couple of times over 5 or so versions of SQL :-) VS may look at the destination server and override your project settings to publish the correct version. – SMM Oct 17 '17 at 12:35
  • It does match. That's what I'm not understanding. I have SQL Server 2016 installed and in my VS reports project my TargetServerVersion is "SQL Server 2016 or later". – C. Williamson Oct 18 '17 at 14:51
  • Oops...misread the server version part. Interesting. Have you tried doing a diff on the RDL deployed by VS that works vs. the RDL from your Bin folder vs. what is deployed by command line tool? – SMM Oct 18 '17 at 17:12
  • I don't know how to see the RDL that VS is actually deploying when I select "Deploy" from the build menu. It does everything behind the scenes. MS hasn't released the source code for this, so I'm not sure what else to try. – C. Williamson Oct 18 '17 at 19:21
  • But you should be able to see the deployed RDL file on the server when you Deploy from the Build menu. – SMM Oct 18 '17 at 21:08

1 Answers1

0

A couple things to try:

  1. What version of VS are you using? I came across an issue where I'd open a solutions in VS 2015 (I think) and it upgraded report definitions without telling me. When you pick a deployment target in VS it changes the file on the fly, not the source file in the solution. Hence the different results you see.
  2. You can check this by downloading a report from SSRS & open the RDL in a text editor. Compare with your solution RDL & check the header. The Schema at the top is what you want to compare:

    Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"

  3. Another option: Have you tried deploying with PowerShell? Check out the SSRS GitHub for commands but it will be 2, maybe 3 lines of code. Very easy to use.

CPorteous
  • 957
  • 6
  • 10