What is use of RSS file in SSRS?

    General discussion

  • Hi,

    Please anyone can tell me what is use of RSS (Reporting Services script) file in SSRS? What does this RSS file contain? Please provide me sample file if you have.

    Thanks Shiven:)
    Thursday, March 24, 2011 8:55 AM

All replies

  • Hi,

    Rss file is used for deploying reports

    Sample code from .rss file

    Dim definition As [Byte]() = Nothing
    Dim warnings As Warning() = Nothing
    Dim DestinationFolder As String = "MyReports"
    Dim parentPath As String = "/" + DestinationFolder
    Dim ReportSource As String
    Public Sub Main()
     	 ReportSource = "D:\Users\Rajesh\MyReport"
       rs.Credentials = System.Net.CredentialCache.DefaultCredentials    
      If rs.GetItemType("/MyReports") = Microsoft.SqlServer.ReportingServices2005.ItemTypeEnum.Folder Then			
      End If
      rs.CreateFolder("MyReports", "/", Nothing)        
      Console.WriteLine("Parent folder [MyReports] created successfully.")
      CreateReportDataSource("MyDataSource", "SQL", "Data Source=(local);Initial Catalog=Northwind")  
      Console.WriteLine("Tasks completed successfully.")
    CATCH ex As Exception
      THROW ex
    End Sub
    Public Sub CreateReportDataSource(name As String, extension As String, connectionString As String)
      'Data source definition.
      Dim definition As New DataSourceDefinition()
      definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
      definition.ConnectString = connectionString
      definition.Enabled = True
      definition.Extension = extension
    		rs.CreateDataSource(name, "/MyReports", False, definition, Nothing)  
    	  Console.WriteLine("Data source: {0} created successfully.", name)
    	CATCH e As Exception
    		Console.WriteLine("ERROR creating data source: " + name)
    		THROW e
    	END TRY
    End Sub 
    Public Sub PublishReport(ByVal reportName As String)	
      Dim stream As FileStream = File.OpenRead(ReportSource + "\" + reportName + ".rdl")
      definition = New [Byte](stream.Length) {}
      stream.Read(definition, 0, CInt(stream.Length))
      rs.CreateReport(reportName, parentPath, False, definition, Nothing)		
      Console.WriteLine("Report: {0} published successfully.", reportName)    
    CATCH e As Exception
    	Console.WriteLine("ERROR while Publishing report: " + reportName) 
    	THROW e
    End Sub



    Rajesh Jonnalagadda
    Thursday, March 24, 2011 1:43 PM
  • Hi S Kumar Dubey,


    Besides Rajesh Jonnalagadda’s professional suggestion, I would like to supply more information about RSS. A Reporting Services script is a Visual Basic .NET code file, which defines the Reporting Services SOAP API. A script file is stored as a Unicode or UTF-8 text file with the extension .rss. The script file acts as a Visual Basic module and can contain user defined procedures and module-level variables. For the script file to run successfully, it must contain the Main procedure.


    For example, we can write scripts that set system properties on the report server. The following Visual Basic .NET script shows one way to set properties.


    Public Sub Main()

        Dim props(0) As [Property]

        Dim setProp As New [Property]

        setProp.Name = "EnableClientPrinting"

        setProp.Value = "False"

        props(0) = setProp



        Catch ex As System.Web.Services.Protocols.SoapException


        Catch e As Exception


        End Try

    End Sub


    For more information about script samples, please see

    Script Samples (Reporting Services):


    If you have any question, please feel free to ask.



    Eileen Zhao

    Monday, March 28, 2011 6:09 AM