Adding a total to a Report (should be easy, right?)

  • Thread starter Thread starter ssignore
  • Start date Start date
S

ssignore

Hello, Community!
I have an incredibly simple report based on a simple count query. One field
is "Case Year" and the other field is a count of the cases by Year. "Total
Cases by Year".
I turned on the totals button in the query and I get a total number of cases
by year (i.e., if there were 50 cases entered in 1982 - I get a 50 for '82;
25 for 1981, I get 25 for '81).
Now, I want the report to display the grand total of cases - taking the
above as an example, I want to see "Total: 75" in the footer of my report,
but "Sum([Total Cases By Year])" isn't working and neither is "Count([Total
Cases by Year])" - why do I continue to get "#Error"??
Thank you.
 
Do you mean on the query or on the report?
I tried the following on the report in the control source:

=Sum([Total Cases by Year])


However, I continue to get #Error

Thank you for the quick reply!

M Skabialka said:
Did you put an "=" sign in front?
="Total: " & Sum([Total Cases By Year])

ssignore said:
Hello, Community!
I have an incredibly simple report based on a simple count query. One
field
is "Case Year" and the other field is a count of the cases by Year.
"Total
Cases by Year".
I turned on the totals button in the query and I get a total number of
cases
by year (i.e., if there were 50 cases entered in 1982 - I get a 50 for
'82;
25 for 1981, I get 25 for '81).
Now, I want the report to display the grand total of cases - taking the
above as an example, I want to see "Total: 75" in the footer of my report,
but "Sum([Total Cases By Year])" isn't working and neither is
"Count([Total
Cases by Year])" - why do I continue to get "#Error"??
Thank you.
 
You stated "in the footer of my report" but you must realize there are many
possible footer sections. The aggregate functions such as =Count() and =Sum()
will work in GROUP and REPORT footers but will not work in PAGE footers.

--
Duane Hookom
Microsoft Access MVP


ssignore said:
Do you mean on the query or on the report?
I tried the following on the report in the control source:

=Sum([Total Cases by Year])


However, I continue to get #Error

Thank you for the quick reply!

M Skabialka said:
Did you put an "=" sign in front?
="Total: " & Sum([Total Cases By Year])

ssignore said:
Hello, Community!
I have an incredibly simple report based on a simple count query. One
field
is "Case Year" and the other field is a count of the cases by Year.
"Total
Cases by Year".
I turned on the totals button in the query and I get a total number of
cases
by year (i.e., if there were 50 cases entered in 1982 - I get a 50 for
'82;
25 for 1981, I get 25 for '81).
Now, I want the report to display the grand total of cases - taking the
above as an example, I want to see "Total: 75" in the footer of my report,
but "Sum([Total Cases By Year])" isn't working and neither is
"Count([Total
Cases by Year])" - why do I continue to get "#Error"??
Thank you.
 
Thank you, Duane.
So, how does one know she is in a "group" or "report" footer?
I was pretty sure I was not in the page footer, but if I know how to make
sure, that would be a help.
Many thanks,
Simone

Duane Hookom said:
You stated "in the footer of my report" but you must realize there are many
possible footer sections. The aggregate functions such as =Count() and =Sum()
will work in GROUP and REPORT footers but will not work in PAGE footers.

--
Duane Hookom
Microsoft Access MVP


ssignore said:
Do you mean on the query or on the report?
I tried the following on the report in the control source:

=Sum([Total Cases by Year])


However, I continue to get #Error

Thank you for the quick reply!

M Skabialka said:
Did you put an "=" sign in front?
="Total: " & Sum([Total Cases By Year])

Hello, Community!
I have an incredibly simple report based on a simple count query. One
field
is "Case Year" and the other field is a count of the cases by Year.
"Total
Cases by Year".
I turned on the totals button in the query and I get a total number of
cases
by year (i.e., if there were 50 cases entered in 1982 - I get a 50 for
'82;
25 for 1981, I get 25 for '81).
Now, I want the report to display the grand total of cases - taking the
above as an example, I want to see "Total: 75" in the footer of my report,
but "Sum([Total Cases By Year])" isn't working and neither is
"Count([Total
Cases by Year])" - why do I continue to get "#Error"??
Thank you.
 
Duane,
I got it - put it in the Report footer and it works perfectly.
Thank you for the solution and information!
Regards,
Simone

Duane Hookom said:
You stated "in the footer of my report" but you must realize there are many
possible footer sections. The aggregate functions such as =Count() and =Sum()
will work in GROUP and REPORT footers but will not work in PAGE footers.

--
Duane Hookom
Microsoft Access MVP


ssignore said:
Do you mean on the query or on the report?
I tried the following on the report in the control source:

=Sum([Total Cases by Year])


However, I continue to get #Error

Thank you for the quick reply!

M Skabialka said:
Did you put an "=" sign in front?
="Total: " & Sum([Total Cases By Year])

Hello, Community!
I have an incredibly simple report based on a simple count query. One
field
is "Case Year" and the other field is a count of the cases by Year.
"Total
Cases by Year".
I turned on the totals button in the query and I get a total number of
cases
by year (i.e., if there were 50 cases entered in 1982 - I get a 50 for
'82;
25 for 1981, I get 25 for '81).
Now, I want the report to display the grand total of cases - taking the
above as an example, I want to see "Total: 75" in the footer of my report,
but "Sum([Total Cases By Year])" isn't working and neither is
"Count([Total
Cases by Year])" - why do I continue to get "#Error"??
Thank you.
 
Back
Top