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!

Gathering Information from Sub-Report to Main Report

Status
Not open for further replies.

trialbyfire

IS-IT--Management
May 11, 2002
19
US
Here is the Deal. I am using a multi grouped drill down report to display open order, in pick, and sales information. Sales and open can be pulled from the same tables. In pick I have to run from a subreport. I need to be able to grab the information from the subreport to use in main report so that I can subtotal the fields. Need help in doing this.

Thanks,

Trial
 
Use a shared variable.

In the main report prior to going into the subreport, use a formula something like the following to reset it:

whileprintingrecords;
shared numbervar MyVar :=0;

In the subreport use a formula like:

whileprintingrecords;
shared numbervar MyVar := MyVar+Table.Field;

In the Main Report you can now reference this shared variable, as in the following formula:

whileprintingrecords;
shared numbervar MyVar;
MyVar / 100

Or whatever you need to do.

-k
 
How would I get the shared number variable to print in the main report? I would like the shared number variable from the subreport to print in the detail level of the main report and then use that field that the number variable is in to sum etc...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top