none
RS.exe error "CreateCatalogItem is not a member of Microsoft.sqlserver.ReportingService2005.ReportingServices2005"

    Question

  • Hi can anyone help me with the problem below?

    I have SQL Server 2012 Enterprise edition installed in our server, I am trying using rs.exe to deploy reports but get error "CreateCatalogItem is not a member of Microsoft.sqlserver.ReportingService2005.ReportingServices2005". I don't understand why this error is keeping showing up since Mgmt2010 is specified already.

    Here is the command:

    "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\rs.exe" -i "C:\testReports\test.rss" -s "localhost/reportserver" -v REPORTNAME="Report" -v REPORTSERVER_FOLDER="/test" -t -v FILEPATH=C:\testReports\ -e Mgmt2010

    and test.rss is simple:

    DIM definition As [Byte]() = Nothing
    DIM warnings As Warning() = Nothing

    Public Sub Main()
     Try
     
     DIM stream As FileStream = File.OpenRead(FILEPATH + REPORTNAME + ".rdl")
     definition = New [Byte](stream.Length-1) {}
     stream.Read(definition, 0, CInt(stream.Length))
     
     warnings = rs.CreateCatalogItem("Report", REPORTNAME, REPORTSERVER_FOLDER, False, definition, Nothing, warnings)

     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: {0} created " + "successfully with no warnings", REPORTNAME)
     End If
     
     Catch e As IOException
     Console.WriteLine(e.Message)
     End Try
    End Sub

    Any idea? Thank you in advance!

    Thursday, July 03, 2014 3:26 AM

Answers

  • Hi Carque,

    Based on my research, I find that the error is caused by the code in test.rss file. After testing the issue in my environment, we can try to use the code below to fix this issue:

    DIM definition As [Byte]() = Nothing
     DIM warnings As Warning() = Nothing
    
    Public Sub Main()
      Try
      
      DIM stream As FileStream = File.OpenRead(FILEPATH + REPORTNAME + ".rdl")
     definition = New [Byte](stream.Length - 1) {}
             stream.Read(definition, 0, CInt(stream.Length))
             stream.Close()
    
        Catch e As IOException
             Console.WriteLine(e.Message)
         End Try
    
        Try
             rs.CreateCatalogItem("Report", REPORTNAME, REPORTSERVER_FOLDER, True, definition, Nothing, warnings)
    
            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: {0} created " + "successfully with no warnings", REPORTNAME)
             End If
    
        Catch e As Exception
             Console.WriteLine(e.Message)
         End Try
     End Sub
    

    Hope this helps.

    Thanks,
    Katherine Xiong


    Katherine Xiong
    TechNet Community Support

    Friday, July 04, 2014 3:54 AM
    Moderator