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

Getting subreport to use main report's parameter for selection formula

Status
Not open for further replies.

bobhilt

Programmer
Aug 2, 2000
20
US
I thought I'd figured this out for proof of concept, but if so, I can't remember just how to do this:

I have one parameter for my main report {?PONumber}, which is used to get header info.

I'd like to use that parameter in my subreport selection as well to get vendor info (3-table join).

From the Select Expert on the subreport, {?PONumber} isn't available (like it doesn't have global scope, basically). If I create a parameter field, same name, on the subreport, they're not linked, so we get two prompts for the same information. (Well, ultimately, there will be 4 subreports, so it would be 5 prompts....)

So how to I get eitherthe main report's parameter to be globally available to the subreports, or get the subreports separate parameters to feed from the value of the main report parameter?
(Version is Seagate Info, V. 7.02)

Thanks. -Bob
 
Answered: From the main design tab, right-clicking on the sub-report gives a "Change Subreport Links" option, which does the trick (exposing the param field).
 
Bob, I had the same question. Because linking the main rpt parm to the sub-report didn't work. The sub-r came up blank as if it didn't the parm link. Any ideas?
 
I'm having a similar problem... I pass a string from VB via a formula to the main report, then the change links in the subreport so that the subreport should only report records matching the formula. Everything looks good, but the subreport is blank.
 
linking the subreport on the parameter in the main report should do the trick.

Check the select statement in the subreport after this is done. The link should be shown there....Sometimes you don't want the link to be be how Crystal has suggested so you can modify it (for example it always is an equals...you might want it not equal for example)

Post the select formula after linking so we can have a look at it if it isn't working. Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top