Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 42573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:21:33+00:00 2026-05-10T15:21:33+00:00

I need to create a repeatable process for deploying SQL Server Reporting Services reports.

  • 0

I need to create a repeatable process for deploying SQL Server Reporting Services reports. I am not in favor of using Visual Studio and or Business Development Studio to do this. The rs.exe method of scripting deployments also seems rather clunky. Does anyone have a very elegant way that they have been able to deploy reports. The key here is that I want the process to be completely automated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:21:34+00:00Added an answer on May 10, 2026 at 3:21 pm

    We use rs.exe, once we developed the script we have not needed to touch it anymore, it just works.

    Here is the source (I slightly modified it by hand to remove sensitive data without a chance to test it, hope I did not brake anything), it deploys reports and associated images from subdirectories for various languages. Also datasource is created.

    '===================================================================== '  File:      PublishReports.rss ' '  Summary: Script that can be used with RS.exe to  '           publish the reports. ' '  Rss file spans from beginnig of this comment to end of module ' (except of 'End Module'). '=====================================================================  Dim langPaths As String() = {'en', 'cs', 'pl', 'de'} Dim filePath As String = Environment.CurrentDirectory  Public Sub Main()      rs.Credentials = System.Net.CredentialCache.DefaultCredentials      'Create parent folder     Try         rs.CreateFolder(parentFolder, '/', Nothing)         Console.WriteLine('Parent folder created: {0}', parentFolder)     Catch e As Exception         Console.WriteLine(e.Message)     End Try      PublishLanguagesFromFolder(filePath)  End Sub  Public Sub PublishLanguagesFromFolder(ByVal folder As String)     Dim Lang As Integer     Dim langPath As String      For Lang = langPaths.GetLowerBound(0) To langPaths.GetUpperBound(0)         langPath = langPaths(Lang)          'Create the lang folder         Try             rs.CreateFolder(langPath, '/' + parentFolder, Nothing)             Console.WriteLine('Parent lang folder created: {0}', parentFolder + '/' + langPath)         Catch e As Exception             Console.WriteLine(e.Message)         End Try          'Create the shared data source         CreateDataSource('/' + parentFolder + '/' + langPath)          'Publish reports and images         PublishFolderContents(folder + '\' + langPath, '/' + parentFolder + '/' + langPath)     Next 'Lang End Sub  Public Sub CreateDataSource(ByVal targetFolder As String)     Dim name As String = 'data source'      'Data source definition.     Dim definition As New DataSourceDefinition     definition.CredentialRetrieval = CredentialRetrievalEnum.Store     definition.ConnectString = 'data source=' + dbServer + ';initial catalog=' + db     definition.Enabled = True     definition.EnabledSpecified = True     definition.Extension = 'SQL'     definition.ImpersonateUser = False     definition.ImpersonateUserSpecified = True     'Use the default prompt string.     definition.Prompt = Nothing     definition.WindowsCredentials = False     'Login information     definition.UserName = 'user'     definition.Password = 'password'      Try     'name, folder, overwrite, definition, properties          rs.CreateDataSource(name, targetFolder, True, definition, Nothing)     Catch e As Exception         Console.WriteLine(e.Message)     End Try  End Sub  Public Sub PublishFolderContents(ByVal sourceFolder As String, ByVal targetFolder As String)     Dim di As New DirectoryInfo(sourceFolder)     Dim fis As FileInfo() = di.GetFiles()     Dim fi As FileInfo      Dim fileName As String      For Each fi In fis         fileName = fi.Name         Select Case fileName.Substring(fileName.Length - 4).ToUpper             Case '.RDL'                 PublishReport(sourceFolder, fileName, targetFolder)             Case '.JPG', '.JPEG'                 PublishResource(sourceFolder, fileName, 'image/jpeg', targetFolder)             Case '.GIF', '.PNG', '.BMP'                 PublishResource(sourceFolder, fileName, 'image/' + fileName.Substring(fileName.Length - 3).ToLower, targetFolder)         End Select     Next fi End Sub  Public Sub PublishReport(ByVal sourceFolder As String, ByVal reportName As String, ByVal targetFolder As String)     Dim definition As [Byte]() = Nothing     Dim warnings As Warning() = Nothing      Try         Dim stream As FileStream = File.OpenRead(sourceFolder + '\' + reportName)         definition = New [Byte](stream.Length) {}         stream.Read(definition, 0, CInt(stream.Length))         stream.Close()     Catch e As IOException         Console.WriteLine(e.Message)     End Try      Try    'name, folder, overwrite, definition, properties          warnings = rs.CreateReport(reportName.Substring(0, reportName.Length - 4), targetFolder, True, definition, Nothing)          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} published successfully with no warnings', targetFolder + '/' + reportName)         End If     Catch e As Exception         Console.WriteLine(e.Message)     End Try End Sub  Public Sub PublishResource(ByVal sourceFolder As String, ByVal resourceName As String, ByVal resourceMIME As String, ByVal targetFolder As String)     Dim definition As [Byte]() = Nothing     Dim warnings As Warning() = Nothing      Try         Dim stream As FileStream = File.OpenRead(sourceFolder + '\' + resourceName)         definition = New [Byte](stream.Length) {}         stream.Read(definition, 0, CInt(stream.Length))         stream.Close()     Catch e As IOException         Console.WriteLine(e.Message)     End Try      Try     'name, folder, overwrite, definition, MIME, properties          rs.CreateResource(resourceName, targetFolder, True, definition, resourceMIME, Nothing)         Console.WriteLine('Resource: {0} with MIME {1} created successfully', targetFolder + '/' + resourceName, resourceMIME)     Catch e As Exception         Console.WriteLine(e.Message)     End Try End Sub 

    Here is the batch to call the rs.exe:

    SET ReportServer=%1 SET DBServer=%2 SET DBName=%3 SET ReportFolder=%4  rs -i PublishReports.rss -s %ReportServer% -v dbServer='%DBServer%' -v db='%DBName%' -v parentFolder='%ReportFolder%' >PublishReports.log 2>&1  pause 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 63k
  • Answers 63k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer GoDaddy Hosting (info) - Really cheap, $5/month. And the most… May 11, 2026 at 10:23 am
  • added an answer Are you using kEAGLDrawablePropertyRetainedBacking in your CAEAGLLayer? If you don't… May 11, 2026 at 10:23 am
  • added an answer Please have a look at JCaiF - 'The Java Computer… May 11, 2026 at 10:22 am

Related Questions

I need to create a repeatable process for deploying SQL Server Reporting Services reports.
I need to create a historical timeline starting from 1600's to the present day.
I need to create a linked server to a DB2 database on a mainframe.
I need to create a backup of a SQL Server 2005 Database that's only
I need to create a 2D int array of size 800x800. But doing so
I need to create a quick-n-dirty knob control in Visual Basic 2005 Express, the
I need to create a batch file which starts multiple console applications in a
I need to create a button that has the same style as ButtonSpec with
I need to create a multi-dimensional (nested) hashtable/dictionary so that I can use syntax
I need to create a news ticker that is updated via an RSS feed.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.