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!

Summing on reports

Status
Not open for further replies.

EnemyGateIsDown

Technical User
Oct 3, 2002
235
GB
Hi Guys,

I have a report which is based on a query and I want to put some totals at the bottom of the page.

I have tried adding a control in the footer which as its data source has =sum(CaterCost), Catercost being a field returned by the query.

In the query catercost is a calculated field (cost*qty) where cost a qty are fields in the table.

However if I run this report I always get #Error# in the Total box.

Can anyone tell me where I am going wrong?

Thanks in advance for any help.

Chris
 
You say you put the field in the 'footer'.

To get a Sum as you describe, your calculated field needs to be in the Report Footer, not the Page Footer.

I checked this in a test report, with a calculated field like your CaterCost field.

I created a Text Control, with its Control Source set to:

=Sum([CaterCost])

... this gives the correct answer when placed in the Report Footer, but the same #Error message when placed in the Page Footer.



Bob Stubbs
 
EnemyGateIsDown, the way I got over that kind of bump is as follows. I created a text box in the detail area of the page and did the calculation in that text box. I them put the text box's visibility to "No" and linked its name to a text box in the footer.

hope this helps

hobman
Explaining what you know to others is learning!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top