tobania / VSTS.Extension.SqlReportingServices

VSTS Extension for uploading SSRS Reports
MIT License
14 stars 20 forks source link

Report version error during deployment #3

Closed devingoble closed 7 years ago

devingoble commented 7 years ago

When I attempt to deploy reports, I get the following error:

##[error]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.

However, deploying from Visual Studio works, and the reports execute fine.

ygeelen-tb commented 7 years ago

Hello, could you send the content of that report and upload a screenshot of your release task configuration? I guess you're using SQL Server 2016 R2?

ygeelen-tb commented 7 years ago

Are you sure you're not deploying to SQL Server 2012 ? What is the TargetVersion in the deploy properties in VisualStudio?

We have tested on SQL Server 2016 and our reports contain the same schema's as your reports: <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition">

devingoble commented 7 years ago

It is being deployed to SQL Server 2012. The report was built in the latest version of SSDT (17.*) for VS2015, and it deploys just fine from Visual Studio. We are only having the problem trying to deploy through TFS.

ygeelen-tb commented 7 years ago

The SSDT versions are specific to SQL Server versions (thus the difference in report schema version). I think you need to install an older version of SSDT to create the reports or modify the reports so they use the SQL Server 2012 schema.

Our extension uses the Reporting Services Web Service. Apparently Visual Studio rewrites the source files depending on the target version so they use a schema version that matches the TargetVersion property: http://stackoverflow.com/questions/36071175/can-i-control-the-version-of-new-ssdt-reports-in-visual-studio We could look into implementing this behavior similarly in our extension.

dschuermans commented 7 years ago

@devingoble When deploying through Visual Studio, it will build the reports for the specified SQL version (in your case 2012) If you are not building your reports on TFS and then deploying the built reports to your reporting server, you will be trying to deploy reports created for SQL 2016 (which is the default when adding new reports in Visual Studio)

Can you please confirm the following:

1.) You are building the report project (.rptproj) in TFS prior to deploying the reports 2.) You are attempting to deploy the built reports (eg /bin/Release/.rdl) 3.) You are not attempting to deploy the reports located directly in the project's root folder

devingoble commented 7 years ago

I didn't know about the extra build step. I will make sure to build the reports in TFS before attempting to deploy.

Thank you.

jguaring commented 7 years ago

@ygeelen-tb Above issues is somewhat similar, but in my case I do build the reports in TFS and Publish them 2017-03-30_9-28-46 2017-03-30_9-29-46 2017-03-30_9-32-30