Reporting services 如何使用rs.exe将TargetServerVersion设置为2016来部署SSRS报告?
我们目前已安装SQL Server和Reporting Services 2016。我们正在使用rs.exe和rss脚本,通过以下命令将报告部署到服务器:Reporting services 如何使用rs.exe将TargetServerVersion设置为2016来部署SSRS报告?,reporting-services,ssrs-2016,rs.exe,Reporting Services,Ssrs 2016,Rs.exe,我们目前已安装SQL Server和Reporting Services 2016。我们正在使用rs.exe和rss脚本,通过以下命令将报告部署到服务器: rs -i ./deploy.rss -s {Report Server URL} -e Mgmt2010" 如果报表rdl文件是在报表项目属性“TargetServerVersion”设置为“SQLServer2008R2、2012或2014”的情况下生成的,则这种方法可以正常工作。但是,如果将其设置为“SQL Server 2
rs -i ./deploy.rss -s {Report Server URL} -e Mgmt2010"
如果报表rdl文件是在报表项目属性“TargetServerVersion”设置为“SQLServer2008R2、2012或2014”的情况下生成的,则这种方法可以正常工作。但是,如果将其设置为“SQL Server 2016或更高版本”并重新生成,则在运行rs.exe时会出现以下异常:
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. Details: '.', hexadecimal value 0x00, is an invalid character. Line 1342, position 10.
at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, ItemType ItemType, CatalogItem& ItemInfo, Warning[]& Warnings)
at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateCatalogItem(String ItemType, String Name, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, CatalogItem& ItemInfo, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2010.CreateCatalogItem(String ItemType, String Name, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, CatalogItem& ItemInfo, Warning[]& Warnings)
deploy.rss脚本此部分中的CreateCatalogItem出现异常:
Dim warnings As Warning() = Nothing
Dim stream As FileStream = File.OpenRead({Path to rdl})
definition = New [Byte](stream.Length) {}
stream.Read(definition, 0, CInt(stream.Length))
stream.Close()
rs.CreateCatalogItem("Report", {Report Name}, {Report Folder}, False, definition, Nothing, warnings)
我唯一更改的是项目属性中的TargetServerVersion。另外请注意,我可以使用VisualStudio菜单中的deploy将2016 RDL部署到2016报表服务器,一切正常。问题只会在使用rs脚本时发生。如何让rs部署2016年报告?当我使用SQL server 2016时,我不应该使用旧版本的RDL。或者rs.exe不再受支持,我应该使用其他东西