Calculate Totals

  • Thread starter Thread starter Public
  • Start date Start date
P

Public

Hi,
I am developing a report in the design mode and the data is coming from
different queries. The report contians data for each month (Jan, Feb etc.).
What I wan is to calculate the total of these months.
I have used something like Sum[JanCourses] + Sum[FebCourses] + ... as a
control source for the total but nothing appears in the total when I open the
report.

Any ideas?
 
Your expression should start with an equal sign and you need parenthises
around the values to sum:
=Sum([JanCourses]) + Sum([FebCourses]) + ...

Also, if [JanCourses] is a control on the report, you can't sum them. You
use the Sum on the fields in the report's recordsource. You can use simple
aritimetic on controls, but not Aggregate functions.
 
Yes, you can say that [JanCourses] is a control on the report and not in the
record set. I have tried using something like [JanCourses] + [FebCourses] +
....
and then with paranthesis ([JanCourses]) + ([FebCourses]) + ...
and nothing appeared again in the total.

Any idea?


Klatuu said:
Your expression should start with an equal sign and you need parenthises
around the values to sum:
=Sum([JanCourses]) + Sum([FebCourses]) + ...

Also, if [JanCourses] is a control on the report, you can't sum them. You
use the Sum on the fields in the report's recordsource. You can use simple
aritimetic on controls, but not Aggregate functions.
--
Dave Hargis, Microsoft Access MVP


Public said:
Hi,
I am developing a report in the design mode and the data is coming from
different queries. The report contians data for each month (Jan, Feb etc.).
What I wan is to calculate the total of these months.
I have used something like Sum[JanCourses] + Sum[FebCourses] + ... as a
control source for the total but nothing appears in the total when I open the
report.

Any ideas?
 
What I was trying to say is you need to use the name of the recordset fields,
not the report controls.
--
Dave Hargis, Microsoft Access MVP


Public said:
Yes, you can say that [JanCourses] is a control on the report and not in the
record set. I have tried using something like [JanCourses] + [FebCourses] +
...
and then with paranthesis ([JanCourses]) + ([FebCourses]) + ...
and nothing appeared again in the total.

Any idea?


Klatuu said:
Your expression should start with an equal sign and you need parenthises
around the values to sum:
=Sum([JanCourses]) + Sum([FebCourses]) + ...

Also, if [JanCourses] is a control on the report, you can't sum them. You
use the Sum on the fields in the report's recordsource. You can use simple
aritimetic on controls, but not Aggregate functions.
--
Dave Hargis, Microsoft Access MVP


Public said:
Hi,
I am developing a report in the design mode and the data is coming from
different queries. The report contians data for each month (Jan, Feb etc.).
What I wan is to calculate the total of these months.
I have used something like Sum[JanCourses] + Sum[FebCourses] + ... as a
control source for the total but nothing appears in the total when I open the
report.

Any ideas?
 
Back
Top