Using Dynamic Connection Strings in SSRS2008

connection-stringreporting-servicesreportingservices-2005ssrs-2008

I have a bunch of SSRS 2008 reports which I'd like to run on several different machines (development, test, production). Each machine has it's own database, so I need to use different connection strings depending on where the report is running.

One workaround I found is to specify the server and catalog name in a hidden parameter that is passed to the report at runtime. It's described in this tutorial, but it applies to SSRS 2005 and I could not make it work in SSRS 2008.

Everything works fine when the connection string in my shared datasource looks like this:

Working Connection String

Just so to see if expressions can be used at all for the connection string, I replaced the connection string with this:

Dynamic but broken connection string

But this gives me the following error when I try to preview the report in Visual Studio:

An error occurred during local report
processing. The item
'/Zeiterfassung-Adrian' cannot be
found.

Are dynamic connection strings still working in SSRS 2008?

If yes, what am I doing wrong?

If not, what else can I do?

Best Answer

It's because it's a shared datasource. Should work fine for a regular embedded datasource. Take a look at THIS link for an option on using dynamic connections strings with shared datasources, might be helpful for you.

Related Topic