Summing in a report

digitalxni

Registered User.
Local time
Today, 20:30
Joined
Nov 18, 2009
Messages
42
Hi guys,

I've got a report that prints out a query and looks like this:

Age Group | Count
Under 1 23
1 Year 34
.
.

And I want to add a field at the end that totals up all of count. I've added a text box to the footer and tried using =Sum([CountOfDoB]) and by setting the text field to do a running sum over CountOfDob. The first gives me an error and the second only counts the first age group and gives a value of 23.

Any ideas what I'm doing wrong?
 
Also just to add this is a subform going into a bigger report. When it's inside the bigger report, it has it's own header and footer cut off! Why is it doing that?
 
You should be summing the field in the detail section of the report not the field in the group footer.
 
If I do it in the detail field then it prints a total after every single row. Here is a screen grab of what I have right now:

screenshot8.jpg
 
Ok so managed to fix it. Added an invisible text box into the detail which ran the sum and then in the page footer I had a textbox grab the value from the sum text box and it worked fine! Just have the issue now of not being able to see the header and footer when it's used as a sub report
 
From what I can see from your image your query is grouping by Age group and summing the numbers (Should be counting at this point). Then in your report the detail section is listing the findings. You need to either remove the grouping from the query and add it to the report or add a report header/footer to sum the CountOfAgeGroup field
 

Users who are viewing this thread

Back
Top Bottom