I find that it's much easier to prepare all required data and let Report Writer just print it.
SELECT DIST district, Student
FROM mytable ;
INTO CURSOR crsStudents
SELECT district, Count(*) AS StudentCount ;
FROM crsStudents ;
GROUP BY 1 ;
INTO CURSOR crsCount
SELECT mt.district, mt.Student, mt.Course, mt.Code, sc.StudentCount ;
FROM mytable mt ;
JOIN crsCount sc ON sc.district = mt.district ;
ORDER BY 1, 2, 3, 4 ;
INTO CURSOR crsResult
>Hello Group,
>
>I am supposed to total the number of students coming from the home districts to the career center which should not be hard, just make a district group and report variable.
>
>The problem is that the student may be taking more than one class and the cursor I am using for the report is distinct by district, student name, ident,course code, and section number and they want a list of the students and the courses they are taking. At the end of each district they want a count of the students from that district.
>
>If the student is taking two different courses at the career center then the he will be in the list twice
>
>Battle Creek Jones,Ted Auto Shop 2
>Battle Creek Jones,Ted Welding 3
>
>Ted will be counted as two students and not one.
>
>Is there a way around this?
>
>Thanks
>Jim
--sb--