:banghead:
I'm giving myself a headache... If someone would be so kind as to point me in the direction of a solution, I would be grateful.
I have a report which should count the number of students and provide the number of hours of service for each major, and then the total of each for the college.
A basic query pulling the hours, colleges, and majors from our contact hours query sufficed to sum the duration for each major, and then sum the hours for the entire college.
To count the students tho, required a subreport. As the Count function counted each record, not unique students.
So, I have a report, grouped on College, then grouped on Major, displaying the total duration for each major, and the number of students, via subreport, in each major (this data is in the Major group header, because in the Detail section, the majors don't group).
In the group footer for each college, a total of the hours for the entire college appears.
I cannot, for the life of me, figure out how to sum the number of students for each college from the subreport to the College group footer. I have scoured the web for 3 days, and every likely expression fails.
I thought at first, DLookup would be helpful, but DLookup only returns the first result of a query.
I thought perhaps I could use the expression to reference a field in a subreport (=Report![Summary]![Summary Subreport]![SalesTotal])
That didn't work either.
I tried DSum, with #Error as my only result.
No luck.
I don't really want to create a sum field in the subreport, because that would involve grouping, which would screw up the format of the report. We're trying to be as concise as possible. There has to be another way.
The fields in question are:
[College], [Major], [Duration] in the main report
and [College], [Major], and [CountofStudentID] in the subreport.
The subreport name is subrpt_UsageStuMajor
The main report name is Usage By College
Your assistance is appreciated, in advance.
Thanks.
I'm giving myself a headache... If someone would be so kind as to point me in the direction of a solution, I would be grateful.
I have a report which should count the number of students and provide the number of hours of service for each major, and then the total of each for the college.
A basic query pulling the hours, colleges, and majors from our contact hours query sufficed to sum the duration for each major, and then sum the hours for the entire college.
To count the students tho, required a subreport. As the Count function counted each record, not unique students.
So, I have a report, grouped on College, then grouped on Major, displaying the total duration for each major, and the number of students, via subreport, in each major (this data is in the Major group header, because in the Detail section, the majors don't group).
In the group footer for each college, a total of the hours for the entire college appears.
I cannot, for the life of me, figure out how to sum the number of students for each college from the subreport to the College group footer. I have scoured the web for 3 days, and every likely expression fails.
I thought at first, DLookup would be helpful, but DLookup only returns the first result of a query.
I thought perhaps I could use the expression to reference a field in a subreport (=Report![Summary]![Summary Subreport]![SalesTotal])
That didn't work either.
I tried DSum, with #Error as my only result.
No luck.
I don't really want to create a sum field in the subreport, because that would involve grouping, which would screw up the format of the report. We're trying to be as concise as possible. There has to be another way.
The fields in question are:
[College], [Major], [Duration] in the main report
and [College], [Major], and [CountofStudentID] in the subreport.
The subreport name is subrpt_UsageStuMajor
The main report name is Usage By College
Your assistance is appreciated, in advance.
Thanks.