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
>>
>>
>>
>

No comments:

Post a Comment