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 964299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:48:16+00:00 2026-05-16T01:48:16+00:00

I have a single server that hosts our production and development databases. It’s running

  • 0

I have a single server that hosts our production and development databases. It’s running SQL Server 2008 (not R2) with SQL Server Reporting Services.

I deploy a VS 2008 Reporting Services project to the server to provide the reports. All the reports use a single shared data source, currently pointing at the production database.

A background service elsewhere creates PDF reports via the web service interface to SSRS.

My question is, given this environment, is it possible to programatically change the data source to be used during execution via the web service so either the dev or production database is used by a report?

I don’t want to modify the shared data source or the report definition, I just want to be able to set the name of the database before I execute the report and I can’t see how this is possible.

The only “simple” solution I can see is to install another report server instance, which seems like overkill for what I want. I’m about to do this unless anyone has a cunning answer for me!

  • 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. Editorial Team
    Editorial Team
    2026-05-16T01:48:16+00:00Added an answer on May 16, 2026 at 1:48 am

    Yes try this:

    1. Create two report parameters “Server” and “Database” (you should probably create a default value so the report will run by default)
    2. define the data source as a Expression like so:

      =”data source=” & Parameters!Server.Value & “;initial catalog=” & Parameters!Database.Value

    Now you should be able to specify the database and server dynamically at run time

    Keep in mind, that the underlying dataset definition needs to be valid in each db and server you execute the report from.

    You can also pass the paremeters via a url string like so:

    http://server/reportserver?/dir/Report&rs:Command=Render&Server=VALUE1&Database=VALUE2
    

    Keep in mind that these need to be URL encoded and to remember to pass the Value, and not the Label if they are different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a single computer with Windows7 Home Premium running with SQL Server 2008
I have two web applications that are running on a single Tomcat server and
On a SQL Server 2008 R2 database I have a table with a single
Lets say that we have a server running multiple virtual hosts. Somefiles and directories
We have an ASP.Net MVC project that will start with a single web server
I have an ubuntu server (11.10) on a single-board computer that occasionally is subject
We have about 7 app servers running .NET windows services that ping a single
We have some EDI files coming in to our BizTalk server that we drop
I have a somewhat large server process written in .net-3.5, that is, running in
I have an server application (running as a Windows Service) that receives calls from

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.