我正在尝试使用rs.exe实用程序并在命令中指定用户名和密码,将许多报告RDL文件手动上载到SSRS。该命令正确执行,并且报告已上载。但是,用户凭据在报表属性的“数据源”部分中不可见。如果我从“报表生成器”上载相同的报表,则用户凭据将正确显示在“数据源”部分下。
这是我正在运行的命令:
rs -i DeployReports.rss -s http://server11/ReportServer_SDM2016 -v tu = XXXX -v tp = XXXXXXX -v ReportFolder = \ Development \ sandbox \ ssrs -v TargetFolder = / ReportTest -v ReportName = Report1
如果我使用开关-u XXX和-p XXXXXX而不是-v tu = XXXX开关,则该命令将返回“无法连接到服务器”。
我整天都在兜圈子,试图找到解决方案,任何想法?
谢谢
邓肯
答案 0 :(得分:0)
这是我正在运行的脚本。
Public Sub Main()
try
Dim ReportDefinition As [Byte]() = Nothing
Dim warnings as Warning() = Nothing
Dim description As New [Property]
Dim properties(0) As [Property]
' Open rdl file
Dim rdlfile As FileStream = File.OpenRead(ReportFolder + "\" + ReportName + ".rdl")
console.write(ReportFolder + "\" + ReportName + ".rdl")
'read report definition
ReportDefinition = New [Byte](rdlfile.Length-1) {}
rdlfile.Read(ReportDefinition, 0, CInt(rdlfile.Length))
rdlfile.Close()
'Set Report Description
description.Name = "Description"
description.Value = "This is my demo report"
properties(0) = description
'Create Report on Report Server
warnings = rs.CreateReport(ReportName, TargetFolder, True, ReportDefinition, Properties)
'display warnings if there are any
If Not (warnings Is Nothing) Then
Dim warning As Warning
For Each warning In warnings
Console.WriteLine(warning.Message)
Next warning
Else
Console.WriteLine("Report: " + ReportName + " published successfully with no warnings")
End If
Catch e As IOException
Console.WriteLine(e.Message)
End Try
End Sub
按照我的建议,我认为我正在使用-u -p开关来打错树。 我需要以正确的用户名和密码设置上载报告的凭据。到目前为止,我找不到正确的方法。 我不需要做的就是上传每个报告,然后手动添加用户凭据。
干杯。