Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing a top level parameter in a subreport

Status
Not open for further replies.

RRinTetons

IS-IT--Management
Jul 4, 2001
333
US
SSRS 2005, VS 2005

Given a top level report TopReport containing two subreports SubReportOne and SubReportTwo. The two subreports exist independently and have been added to the project in VS. Each has its own Report Parameters that are passed to the stored procedures that collect data. SubReportOne uses Parm1, Parm2, Parm3 and Parm4. SubReportTwo uses Parm1, Parm2, Parm3, Parm5 and Parm6.

TopReport is simply a container for the two subreports. It doesn't have a query at all.

As I understand it, I need to add Parm1, Parm2, Parm3, Parm4, Parm5 and Parm6 as Report Parameters for TopReport, then pass the ones required into SubReportOne and SubReportTwo to be passed on to the sp's.

When I set up the Subreport Properties Parameters tab, how do I reference the values from TopReport's parameters? Or, is there some other way to pass those parms on into the sp's for the subreports? Or, have I got the entire concept crosswise?

-
Richard Ray
Jackson Hole Mountain Resort
 
When setting the value of the subreport's parameters in the subreport properties from the main report, it's as simple as =Parameters!SomeParameter.Value
 
Argh.

So Parameters.xxxxxxx.Value always refers to the top level report? That's way too simple.



-
Richard Ray
Jackson Hole Mountain Resort
 
From the properties of the subreport with in the main report, not within the subreport's report properties
 
OK, so I'm going to restate what I think I hear you saying:

The Report Parameters of the top level report can be referenced within the properties dialog of the subreport in the subreport area as it exists on the top level reports design surface. The parameter names for defined in the subreport to which the top level report's values have been assigned are then passed to the subreport's query parameters so that the right data can be retrieved.

Sorry to be dense, it's one of those things that I'll find simple when I know how to do it, but is a bit opaque until then.


-
Richard Ray
Jackson Hole Mountain Resort
 
Got it. Onward. It's downstream from here.

Many thanks...

-
Richard Ray
Jackson Hole Mountain Resort
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top