【问题标题】:Uploading RDL report to SSRS not including user credentials将 RDL 报告上传到 SSRS,不包括用户凭据
【发布时间】:2019-02-07 14:20:58
【问题描述】:

我正在尝试使用 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 开关,则命令返回“无法连接到服务器”。

我整天都在兜圈子试图找到解决方案,有什么想法吗???

谢谢

邓肯

【问题讨论】:

  • 命令行开关 -u 和 -p 用于在运行脚本时连接服务器。由于我们看不到脚本,我们不知道数据源是否被覆盖,也不知道脚本对参数“ut”和“up”做了什么。

标签: reporting-services rdl


【解决方案1】:

这是我正在运行的脚本。

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 开关在错误的树上吠叫,正如建议的那样。 我不知何故需要使用正确的用户名和密码设置上传报告的凭据。到目前为止,我找不到正确的方法。 我不想做的是上传每个报告,然后手动添加用户凭据。

干杯。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多