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

Shared Variable pass

Status
Not open for further replies.

ed1988

Technical User
Jul 14, 2006
9
US
CR.XI

I know how to pass a variable from the subreport to the main report - can you pass a variable from the main report to the subreport?

Subreport:
WhilePrintingRecords;
Shared numberVar consumptBF;

ConsumptBF

Mainreport:
WhilePrintingRecords;
Shared numberVar consumptBF:
=Sum({rwo_citem.inventDec},{rwo_hdr.rwoNum})

When I check my formula for the main report it does give me the value I am looking for but it doesn't pass to the subreport.

Any ideas.
 
State WHERE you're placing the formula in the main report and where the subreport is.

The main report formula must be in a section PRIOR ot the sunreport, so if the subreport is in the rwo_hdr.rwoNum group, right click the group header or footer that it's in, select insert section below, place the subreport in the lower section, the formula in the upper, and suppress the upper.

Now the formula is populated PRIOR to running the subreport.

-k
 
Thank you for the information - this is my fix.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top