Showing posts with label viewing. Show all posts
Showing posts with label viewing. Show all posts

Monday, March 19, 2012

Change Data Source at run time

Hi,
I am using a web Report viewer control for viewing reports on a SRS 2005
report server.
Is it possible to change the data source of the report at run-time?
e.g. I have 2 identical databases - the live database and a test
database. I want to be able to set the data source to point to one of
these depending whether I am testing or not.
This was easily achieved with Crystal, but I cannot work out how to do
it using SQL Reporting Services.
Any help apprectiated.
Thanks.
PaulIf you are using the VS 2005 viewer control then I think you can set it in
there. Another option might be to base the report on a stored procedure
that returns records based on a parameter sent. For example, if parameter =1 then select from live database and if = 0 select from test database.
David
"Paul Cheetham" <PAC.News@.dsl.pipex.com> wrote in message
news:ODJVQZm2HHA.5884@.TK2MSFTNGP02.phx.gbl...
> Hi,
> I am using a web Report viewer control for viewing reports on a SRS 2005
> report server.
> Is it possible to change the data source of the report at run-time?
> e.g. I have 2 identical databases - the live database and a test database.
> I want to be able to set the data source to point to one of these
> depending whether I am testing or not.
> This was easily achieved with Crystal, but I cannot work out how to do it
> using SQL Reporting Services.
> Any help apprectiated.
> Thanks.
>
> Paul|||see ths 2005 BOL at
http://msdn2.microsoft.com/en-us/library/ms156450.aspx
"Paul Cheetham" <PAC.News@.dsl.pipex.com> wrote in message
news:ODJVQZm2HHA.5884@.TK2MSFTNGP02.phx.gbl...
> Hi,
> I am using a web Report viewer control for viewing reports on a SRS 2005
> report server.
> Is it possible to change the data source of the report at run-time?
> e.g. I have 2 identical databases - the live database and a test database.
> I want to be able to set the data source to point to one of these
> depending whether I am testing or not.
> This was easily achieved with Crystal, but I cannot work out how to do it
> using SQL Reporting Services.
> Any help apprectiated.
> Thanks.
>
> Paul