0
votes

I am trying to manually upload a number of report RDL files to SSRS using the rs.exe utility and specifying the user name and password in the command. The command executes correctly and the report is uploaded. However, the user credentials are not visible in the Data Source section of the reports properties. If I upload the same report from Report Builder, the user credentials appear correctly under the Data Source section.

This is the command I am running:

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

If I use the switches -u XXX and -p XXXXXX instead of the -v tu=XXXX switches, then the command returns "Could not connect to server".

I have been going around in circles for day trying to find a solution, any ideas???

Thanks

Duncan

1
The command line switches -u and -p are used to connect to the server when running the script. Since we can't see the script, we neither know if datasources are overwritten not what the script does with the parameters "ut" and "up". - Wolfgang Kais

1 Answers

0
votes

This is the script I am running.

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 

I think I am barking up the wrong tree with the -u -p switches, as suggested. I somehow need to set the credentials of the uploaded report with the correct user name and password. I cant find the correct way to do it so far. What I dont want to have to do is upload each report and then add the user credentials manually.

Cheers.