View Full Version : How do i add calculations to a report?


Tekture
03-04-2009, 11:42 AM
I have a report that tracks Job Announcements for my organization. The report is based on a query, and inside that query i have some calculations (IE. time between 2 dates)

The jobs are grouped by department, so i have a group header and footer. This is the only group. In the group footer, i want to be able to display the total jobs in that group, the average of a calculation result, and the percentage of jobs against all jobs.

To make things even more complicated, i have a filter by form that lets you select a specialist. Then it shows all jobs, just by that specialist.

I had planned on using a Dcount (for the total) and Daverage (for the average) But how do I apply these formulas to this report?

Yeah, i could write a Dcount formula that picks out a SPECIFIC department and SPECIFIC specialist, but how can i write a smart one that will adjust itself depending on the department its grouped under and the specialist that was choosen?

Thanks!

ColinEssex
03-04-2009, 01:07 PM
The jobs are grouped by department, so i have a group header and footer. This is the only group. In the group footer, i want to be able to display the total jobs in that group, the average of a calculation result, and the percentage of jobs against all jobs.


I may be wrong being as reports are not my strong point:( but won't the report wizard do all this for you? If not it'll get you close and you can tweak it as necessary if needed.

Col

Tekture
03-04-2009, 01:42 PM
If you're talking about the grouping and sorting, yes the wizard does that. I'm not aware of it doing any formulas tho.

The goal, for example, is this:
a. 5 classes in a school
b. Over 10 students in a class (random number)
c. Separate the report by class and then total the number of students in that class.

A Dcount formula will do this, but how do i refer to this "class" when it changes.
In my real scenario, the specialist belongs to several departments. I don't know how to refer to that random department....