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

Summing field in Report Header

Status
Not open for further replies.

Dons1000

Programmer
Jul 18, 2006
17
0
0
US
How do you sum a value that is placed in a header section. For example, the data being returned to the report looks like this (3 Rows).

Salesperson Customer Product ProductCost SoftCost
Steve A 1 $2,000 $500
Steve A 2 $5,000 $500
Steve B 3 $4,000 $450

The first Header is for the Salesperson, the second is for the Customer and the Detail is at the product. The Soft Costs are at the Customer level and don't get broke up by Product.

The report would look like this
----------------------------------------------------------------------
Salesperson Steve (Header 1)
Customer A SoftCost = $500 (Header 2)
Product 1 $2,000 (Detail Line)
Product 2 $5,000
Customer B SoftCost = $450
Product 3 $4,000

Salesperson Footer ProductCost Total = $11,000 SoftCost Total = $950
----------------------------------------------------------------------
For the Product total I do =sum(ProductCost), but doing =sum(SoftCost) would give me $1450. I tried renaming the control in the header to txtSoftCost and doing =sum(txtSoftCost) but that gave me an error.

Thanks

Don
 
Add a text box to the Salesperson group header:
Name: txtSoftCostRS
Control Source: SoftCost
Running Sum: Over All
Visible: No
Add a text box to the Report Footer:
Control Source: =txtSoftCostRS

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top