I have two databases on the same SQL server which have identical data
structures.
I want to be able to use one set of reports on my report server to run
against either database. How can I achieve this? Whenever I run the report
it always runs against whatever the datasource points at.
NickWhat you do is write a stored procedure for your sql need in third database
other than those two and write in a way that it can accept database name and
then fully qualify your object name and build a dynamic sql in the proc. Use
this proc in RS to buid one dataset and create another dataset with simple
query like "select dbname from sysdatabases where <criteira of your
interest>". Use this dataset as a input to the parameters of the first
database so the final report will have at least one parameter to pick a
database name from the dropdown list and you can run your report off of
selected database. I have implemented this way and I am running my report
off of more than two database from one server and it works great. Let me
know if you have any difficulties. email me.
Vipul Shah
"Nick Jacobs" wrote:
> I have two databases on the same SQL server which have identical data
> structures.
> I want to be able to use one set of reports on my report server to run
> against either database. How can I achieve this? Whenever I run the report
> it always runs against whatever the datasource points at.
> Nick
>
>
No comments:
Post a Comment