Calculate Totals

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?
 
K

Klatuu

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.
 
P

Public

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?
 
K

Klatuu

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top