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

Computed field from two fields within two sub reports

Status
Not open for further replies.

monrosal

Programmer
Aug 22, 2000
42
US
Does anyone know how I can grab a value from one sub report textbox and another value from another sub report textbox to compute a value on the main Report? Basically, I want to use two different fields from two different sub reports to come up with a value for a textbox on the Main report? I've tried everything. Thanks in advance.

Ramon
 
Look at doing the calculation not from the subreports but from the queries that populate the subreports. Possibly using a DLookup?

HTH Joe Miller
joe.miller@flotech.net
 
I strongly recommend you stay away from domain aggregate functions if possible.

Keep in mind the subreports are subsets of data and depending on where they are placed on the main report can generate a lot of data. To take a value from the subreports it should probably be an aggregate of whatever records make up the subreport(I'm assuming the subreports have more than one record otherwise why have subreports to begin with?). Because they are subreports you cannot use page headers or footer but you can use report headers or footers. Even if you don't want the summary field to display on the subreport you can still have a control assigned to capture the data you wish transfered to the main report(simply hide it/them). Then on the main report you can address the subreport controls. Simply insure you use the full path to each control:

=Reports!MainReportName!SubreportName!ControlName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top