Showing posts with label fly. Show all posts
Showing posts with label fly. Show all posts

Tuesday, March 20, 2012

Change datasource on the fly

is it possible to change the differece datasource when execution of report,
since I need to keep the data into 5 difference databases by some reasons,
but I don't want to create 5 new reports for that each time. it wastle a lot
of time to reproduce the same reports. any ideas I appreciated.
Thanks in advance.Hi,
you can use parametrization to use IIF to change the datasource
properties.
HTH, Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--|||Could you please give me some samples, I am a newbie for RS.
"Jens" <Jens@.sqlserver2005.de>
'?:1168941447.869460.85450@.11g2000cwr.googlegroups.com...
> Hi,
> you can use parametrization to use IIF to change the datasource
> properties.
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>|||Hi,
i don=B4t have actually a RS Server at hand but it is like the following
query (non-tested), change the connection string to listen to a
parameter:
=3D"Data Source=3D" & Parameters!DataSourceSelector.Value & ";Initial
Catalog=3DSomeDB"
You can also use IIF in the above mentioned statment, like:
=3D"Data Source=3D" & IIF(Parameters!DataSourceSelector.Value =3D
"TestEnvironment";"TestServer";ProductionServer) & ";Initial
Catalog=3DSomeDB"
HTH, Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--

Thursday, March 8, 2012

Change a subreports report source

Is there a way to change a subreports report source on the fly? I would
like to change the report based on a parameter that is passed to the main
report.
Thanks,
TimThere is in 2005. Expression based data sources (this is true for all
reports, not just sub reports).
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rptsrvr9/html/4d8f0ae1-102b-4b3d-9155-fa584c962c9e.htm
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Tim Kelley" <tkelley@.company.com> wrote in message
news:%23xZLyu6oHHA.2044@.TK2MSFTNGP04.phx.gbl...
> Is there a way to change a subreports report source on the fly? I would
> like to change the report based on a parameter that is passed to the main
> report.
> Thanks,
> Tim
>|||Can I use this method to change the report (not the data) that is used in a
subreport?
Tim
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:ezNYoY8oHHA.4652@.TK2MSFTNGP02.phx.gbl...
> There is in 2005. Expression based data sources (this is true for all
> reports, not just sub reports).
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rptsrvr9/html/4d8f0ae1-102b-4b3d-9155-fa584c962c9e.htm
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Tim Kelley" <tkelley@.company.com> wrote in message
> news:%23xZLyu6oHHA.2044@.TK2MSFTNGP04.phx.gbl...
>> Is there a way to change a subreports report source on the fly? I would
>> like to change the report based on a parameter that is passed to the main
>> report.
>> Thanks,
>> Tim
>|||Ahhh, that's what you want to do. No, you cannot change which subreport is
called. What most people do in this situation is embed multiple subreports
and then hide and show them depending on conditions. There is a visibility
parameter that you can set to an expression to control this.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Tim Kelley" <tkelley@.company.com> wrote in message
news:ujKjidEpHHA.3644@.TK2MSFTNGP02.phx.gbl...
> Can I use this method to change the report (not the data) that is used in
> a subreport?
> Tim
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:ezNYoY8oHHA.4652@.TK2MSFTNGP02.phx.gbl...
>> There is in 2005. Expression based data sources (this is true for all
>> reports, not just sub reports).
>> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rptsrvr9/html/4d8f0ae1-102b-4b3d-9155-fa584c962c9e.htm
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Tim Kelley" <tkelley@.company.com> wrote in message
>> news:%23xZLyu6oHHA.2044@.TK2MSFTNGP04.phx.gbl...
>> Is there a way to change a subreports report source on the fly? I would
>> like to change the report based on a parameter that is passed to the
>> main report.
>> Thanks,
>> Tim
>>
>|||Is it possible to create the subreport control on the fly and set the report
property then?
Tim
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:u5SBJiEpHHA.4192@.TK2MSFTNGP06.phx.gbl...
> Ahhh, that's what you want to do. No, you cannot change which subreport is
> called. What most people do in this situation is embed multiple subreports
> and then hide and show them depending on conditions. There is a visibility
> parameter that you can set to an expression to control this.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Tim Kelley" <tkelley@.company.com> wrote in message
> news:ujKjidEpHHA.3644@.TK2MSFTNGP02.phx.gbl...
>> Can I use this method to change the report (not the data) that is used in
>> a subreport?
>> Tim
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:ezNYoY8oHHA.4652@.TK2MSFTNGP02.phx.gbl...
>> There is in 2005. Expression based data sources (this is true for all
>> reports, not just sub reports).
>> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rptsrvr9/html/4d8f0ae1-102b-4b3d-9155-fa584c962c9e.htm
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Tim Kelley" <tkelley@.company.com> wrote in message
>> news:%23xZLyu6oHHA.2044@.TK2MSFTNGP04.phx.gbl...
>> Is there a way to change a subreports report source on the fly? I
>> would like to change the report based on a parameter that is passed to
>> the main report.
>> Thanks,
>> Tim
>>
>>
>|||You would need to create RDL on the flyl. RDL is the xml specification for
the report. You would need to change and deploy it and then remove it when
the user is done (all of this can only be done if you have your own website
integrated in). Non-trivial and slow (you have the time for deployment). If
you have your own website you could use the new webform control that comes
in VS 2005. It has a local mode where you give it the data and the report.
Again, it is non-trivial. When in local mode you have a whole lot more work
to do than you do in server mode.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Tim Kelley" <tkelley@.company.com> wrote in message
news:u5GQQ2EpHHA.2044@.TK2MSFTNGP04.phx.gbl...
> Is it possible to create the subreport control on the fly and set the
> report property then?
> Tim
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:u5SBJiEpHHA.4192@.TK2MSFTNGP06.phx.gbl...
>> Ahhh, that's what you want to do. No, you cannot change which subreport
>> is called. What most people do in this situation is embed multiple
>> subreports and then hide and show them depending on conditions. There is
>> a visibility parameter that you can set to an expression to control this.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Tim Kelley" <tkelley@.company.com> wrote in message
>> news:ujKjidEpHHA.3644@.TK2MSFTNGP02.phx.gbl...
>> Can I use this method to change the report (not the data) that is used
>> in a subreport?
>> Tim
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:ezNYoY8oHHA.4652@.TK2MSFTNGP02.phx.gbl...
>> There is in 2005. Expression based data sources (this is true for all
>> reports, not just sub reports).
>> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rptsrvr9/html/4d8f0ae1-102b-4b3d-9155-fa584c962c9e.htm
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Tim Kelley" <tkelley@.company.com> wrote in message
>> news:%23xZLyu6oHHA.2044@.TK2MSFTNGP04.phx.gbl...
>> Is there a way to change a subreports report source on the fly? I
>> would like to change the report based on a parameter that is passed to
>> the main report.
>> Thanks,
>> Tim
>>
>>
>>
>