Groups | Blog | Home
all groups > sql server reporting services > may 2007 >

sql server reporting services : Change a subreports report source



Tim Kelley
5/31/2007 12:47:00 PM
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

Bruce L-C [MVP]
5/31/2007 3:56:25 PM
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

[quoted text, click to view]

Bruce L-C [MVP]
6/1/2007 12:00:00 AM
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

[quoted text, click to view]

Tim Kelley
6/1/2007 12:00:00 AM
Is it possible to create the subreport control on the fly and set the report
property then?

Tim

[quoted text, click to view]

Tim Kelley
6/1/2007 7:21:26 AM
Can I use this method to change the report (not the data) that is used in a
subreport?

Tim

[quoted text, click to view]

Bruce L-C [MVP]
6/1/2007 10:44:47 AM
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

[quoted text, click to view]

AddThis Social Bookmark Button