Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculation issue

Status
Not open for further replies.

gj0519

MIS
May 8, 2003
69
US
Cr10Dev Sql Server 08

I need to create a formula that displays daily attendance, attendance is taken for each class period. I only need to show they were absent if they missed 5 or more periods per day, then have a running total of their absences. Not sure where to start. Currently my grouping is by studentid.

Thanks,

GJ
 
GJ,
How is it indicated that a student was absent? Is there a field that shows this? Also, in the final report are you wanting to see what days the student was absent (possibly how many periods they missed on that day) and how many days they were absent in the student grouping?
 
I'd do it using parameters. A date range and the number of days in that period that a student should have been attending. Do a summary count for each studentid. Use group selection to suppress any where the difference between the count and the parameter was 5 or more.

One problem - this method might miss any student who did't attend at all. If 'student' is one record and 'attendance' is another, you could solve that by left-outer.

If there is more than one attendance record per day, do a distinct count on the date, so each date counts just once.

You could also do it using running totals, but summary totals are quicker. If you're not already familiar with Crystal's automated totals, see FAQ767-6524.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top