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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing value from subreport for record selection

Status
Not open for further replies.

sfabry

Technical User
Feb 28, 2012
46
US
I have not found a specific answer to this question:
can you pass a value from a subreport to main report and use the passed value in group or record selection? is this what is meant by 'parameter' or is it strictly "?parameters" they cannont be used in?
 
Yes, you can use parameters in the sub record or group selection formulas. You can't use shared variables though in these areas. If you link a sub based on a field in the main report, it will appear as a parameter like this in the record selection formula:

{subrpt.field}={?pm-maintable.field}

But you can also link parameters created in both main and subreports to each other, and then use them in selection formulas.

{table.field}={?Parameter}

-LB
 
the first instance i am familiar with but can you explain how you would link parameters to use in selection formulas?
 
In the edit subreport links screen, choose the parameter at the top and then in the lower left, use the dropdown to select {?Parameter} instead of the default {?pm-?Parameter}. This means there will only be one prompt, but you still need to add and use the parameter to the selection formula in the subreport.

-LB
 
I am not sure if this will accomplish what I am trying to but am curious. My only choices under "subreport parameter to use" are blank, "Parameter Fields," and "?Pm.." So I am not sure what you are referring to?
I am trying to say, in the main report record selection, "if 'subreport field' (which is where i was trying to place a shared variable) = x then 'main report field' else ""
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top