summarizing multiple recordsets

CoachPhil

Registered User.
Local time
Today, 11:06
Joined
Jun 24, 2008
Messages
83
Showing my newbiness with this question,

If I have a table with 100 employees and a record of their activity for each day of the month,
can I total their records and show the summed total in 1 text box on the report?

CoachPhil
 
Give some detail want data you want to show
 
I have 100 + employees and would like to accumulate their talk times on the telephone over a period of time.
Some of the items that would be accumulated are;
t_logged_in
talk_time
n_ready_time
these items are all reported in seconds, which I will need to convert to hh:mm:ss
Other items would be;
number_of_calls
times_on_hold
number_of_secondary_line_calls
etc

CoachPhil
 
Sorry, forgot to mention that this report is based on a query that has all the available information
 
Code:
SELECT SUM(TheColumnYouWantToTotal) FROM TheTableOrQueryYouWantToUse;

There's also Dsum(), which I'm pretty sure that if you click on the tiny ... button to right of the control's controlsource property and select "Expression Builder", you can navigate to Built-In Functions and select Dsum() then fill in the parameter required.

HTH.
 
ORDER BY clause is what you use to sort. But if we're doing a sum, you may want GROUP BY to get sum for each employees, rather than one huge sum for everyone.

Code:
SELECT SUM(foo) FROM bar GROUP BY iter;
 
If you let the wizard make the report, it will ask you the sorting/grouping and summing questions. Once the report is built, open it in design view and make it pretty.
 

Users who are viewing this thread

Back
Top Bottom