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!

Returning Numeric Values from Subreport

Status
Not open for further replies.

trialbyfire

IS-IT--Management
May 11, 2002
19
US
Here is the deal.

In the detail section of the report I have 4 seperate subreports. One detailing open dollars, one detailing booked dollars, one detailing picked dollars and one detailing sold dollars. Two groups exist above the detail. The first broken down by month the second by customer.

The subreports are detailing unit and dollar amounts. However; being that they are in a subreport I am having problems pulling the numeric values from the subreport into a field in the main report that I can then subtotal in each of the groups that lay above the detail section. Any help with this would be greatly appreciated.
 
You need to use shared variables to transfer the data between the subreports and the main report:

Intialize in main report..
Set value in subreport..
Use in main report..
Reset for use next round (important esp if there can be a blank subreport)

As a general rule, you need to use the shared variale in the main report in a section *after* it is set in subreport.

ie subreport in g1a use in main in g1b

Lisa
 
Lisa,

This is great advice. One quick question? What would be the syntax that I would use as I am not that familiar with the shared num variable commands and also if I were to insert a second detail section in the report that I suppressed and then subtotaled off of that would this work?

Thought is that in the second detail section I would include a formula field stating
[=shared num variable xxxxxx] and then subtotal off of that for the rest of the groups. If I am reseting the num variable after each occurance shouldn't the formula field that I enter in the second detail section match the number in the subreport?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top