• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 542
  • Last Modified:

Passing one parameter to multiple subreports

Experts,

I'm developing a report that uses subreports.  I need to pass a "common" date range that the user will enter once to each of the subreports to be used as a select statement.  

I know how to add parameters to the subreport and include them in the subreport select expert but because the date range is always the same - my client only wants to add the date range once.

Can you help?  What's the easiest way?

Thanks in advance

Steve
0
SStroz
Asked:
SStroz
  • 3
  • 2
2 Solutions
 
mlmccCommented:
Add it to the main report and link the subreports to the main report using it.

mlmcc
0
 
SStrozAuthor Commented:
mlmcc,

I tried that and the parameter from the main report wasn't available inside the subreport.  I'm trying to use the Select Expert in the subreport.  Where do I look?

Steve
0
 
mlmccCommented:
You have to link it through the subreport link expert

Insert the subreport
One of the options is to link it

If the subreport is already in you can right it and select CHANGE SUBREPORT LINKS
For the main report choose the date range
The subreport should create a parameter or use the ne you have
You can then select to filter records based on a field.  Choose your date field.

mlmcc
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
SStrozAuthor Commented:
mlmcc,

I tried your instructions and it doesn't seem to be working.  In the main report I have a static date parameter.  It doesn't seem like I can use that as a link to the subreport.

I tried creating a similar parameter in the subreport and linking to it - but that didn't work either.

Any ideas?

Steve
0
 
frodomanCommented:
>>> In the main report I have a static date parameter

What is a "static date parameter" - does this mean you're hard coding the value?

What you need to do is create a date parameter on your main report - call it param1.  Create a date parameter in your subreport - call it param2.  Now rt-click on your subreport and select "change subreport links".  In the available box find your main report parameter {?param1} and select it.  In the subreport box click the dropdown and select {?param2}.  Now simply display param2 on your subreport (don't worry about filtering data with it yet) and make sure the value displayed on the subreport matches what was entered on the main report when it is refreshed.

Once that works add the param2 to your subreport select expert.  Repeat the same process for each subreport.

frodoman
0
 
mlmccCommented:
Glad i could help

mlmcc
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now