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

Passing variable from sub report to main.

Status
Not open for further replies.

sjjustina

IS-IT--Management
Apr 23, 2007
30
US
I have a main report printing values from a parent table in the Details section of the report. In the child table is a length field that I need to print the average of. How do I do this?

thanks, Sarah
 
Your posts are too brief, not providing sufficient information. Do you mean that you want to see an average per parent? Per some group? What groups are using?

-LB
 
Sorry, I'll try to give more detail. The parent table is a bundle of lumber. The children are the length details of the bundle for each piece of wood in the bundle. For each parent record I need the agerage of the lengths in the child table. I'm not grouping because I'm only printing the parent record. Thanks.
 
You need to group on the bundle field to do the calculation. You would place the length field in the detail section and right click on it and insert a summary (average) on the length at the group (bundle) level. You can then suppress the detail section and group header, and drag the bundle groupname to the group footer.

-LB
 
So I just realized from your thread title that the "child" table is in a subreport? I'm also confused about what is currently appearing in the detail section of your main report--is it the bundle or the individual pieces of wood in the bundle? Please use some field names when referencing your data.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top