Shared Datasources that use dynamic DB connection strings

Is it possible to create a shared datasource that uses a dynamic DB connection string I can't seem to get it to work. The db connection string is as such (server and DB names changed):

="Data Source=" & IIF(Hour(TimeValue(Today)) Mod 2, "FirstServer;Initial Catalog=exampleDB", "SecondServer;Initial Catalog=exampleDB")

I can see why this wouldn't work as a shared datasource if I was using a report-specific parameter, but I'm just switching the server/DB based on the time. Anything special that I need to do to get this to work



Answer this question

Shared Datasources that use dynamic DB connection strings

  • Adrian Cordoba

    Dynamic connection strings are not supported in shared datasources.

    -Tudor

  • Gordopolis

    That's too bad... I have ~ 50 reports that need to switch between two servers and databases based on odd/even hours. With a shared data source, if the timing ever needed to change, it would be a trivial modification. Going in and editing each report is a mornings worth of work... oh well.
  • Shared Datasources that use dynamic DB connection strings