Tuesday, March 20, 2012

Can I change database in shared data source?

Hi all,
I have several reports using single shared datasource. I want to
change at a runtime database that is used by that datasource. Can this
be achieved? If not what are the other solutions - I guess that using
not shared datasource for each report may be the solution (is it?) but
it is possible for me. Can database name be changed in shared
datasource? My goal is to allow users to run the same set of reports,
viewed in ReportViewer control, but using different databases
(connection string dependant).
Thanks in advance for any suggestionsMay be to crarify a bit. I have to use shared datasource. So there are
two solutions for me. 1) Change database in shared datasource. 2)
Switch between datasources
Alas none of them appears to be possible at a runtime.
Please help.
On Mar 20, 2:54 pm, "Tomaszek" <Tomasz...@.gmail.com> wrote:
> Hi all,
> I have several reports using single shared datasource. I want to
> change at a runtime database that is used by that datasource. Can this
> be achieved? If not what are the other solutions - I guess that using
> not shared datasource for each report may be the solution (is it?) but
> it is possible for me. Can database name be changed in shared
> datasource? My goal is to allow users to run the same set of reports,
> viewed in ReportViewer control, but using different databases
> (connection string dependant).
> Thanks in advance for any suggestions|||You can do this in SQL 2005. Your datasource can be an expression (you can
have a parameter that is used to specify the database).
Check books on line. I haven't done this but I know it is a feature that was
added in 2005.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Tomaszek" <TomaszekS@.gmail.com> wrote in message
news:1174403172.440357.73260@.e1g2000hsg.googlegroups.com...
> May be to crarify a bit. I have to use shared datasource. So there are
> two solutions for me. 1) Change database in shared datasource. 2)
> Switch between datasources
> Alas none of them appears to be possible at a runtime.
> Please help.
>
> On Mar 20, 2:54 pm, "Tomaszek" <Tomasz...@.gmail.com> wrote:
>> Hi all,
>> I have several reports using single shared datasource. I want to
>> change at a runtime database that is used by that datasource. Can this
>> be achieved? If not what are the other solutions - I guess that using
>> not shared datasource for each report may be the solution (is it?) but
>> it is possible for me. Can database name be changed in shared
>> datasource? My goal is to allow users to run the same set of reports,
>> viewed in ReportViewer control, but using different databases
>> (connection string dependant).
>> Thanks in advance for any suggestions
>|||But I'm affraid that it can be expression only in non shared
datasource :(
Tommy
On Mar 20, 3:11 pm, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> You can do this in SQL 2005. Your datasource can be an expression (you can
> have a parameter that is used to specify the database).
> Check books on line. I haven't done this but I know it is a feature that was
> added in 2005.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Tomaszek" <Tomasz...@.gmail.com> wrote in message
> news:1174403172.440357.73260@.e1g2000hsg.googlegroups.com...
>
> > May be to crarify a bit. I have to use shared datasource. So there are
> > two solutions for me. 1) Change database in shared datasource. 2)
> > Switch between datasources
> > Alas none of them appears to be possible at a runtime.
> > Please help.
> > On Mar 20, 2:54 pm, "Tomaszek" <Tomasz...@.gmail.com> wrote:
> >> Hi all,
> >> I have several reports using single shared datasource. I want to
> >> change at a runtime database that is used by that datasource. Can this
> >> be achieved? If not what are the other solutions - I guess that using
> >> not shared datasource for each report may be the solution (is it?) but
> >> it is possible for me. Can database name be changed in shared
> >> datasource? My goal is to allow users to run the same set of reports,
> >> viewed in ReportViewer control, but using different databases
> >> (connection string dependant).
> >> Thanks in advance for any suggestions- Hide quoted text -
> - Show quoted text -sql

No comments:

Post a Comment