Joined: 19 Nov 2011
Online Status: Offline
Posts: 1
Topic: totalling a shared variable Posted: 19 Nov 2011 at 11:54am
Hi.
I have a report with two subgroups:
SB1 Teacher SB2 Subject
I also have a subreport which is linked by Subject to the main report. I the subreport, I have a calculated field showing the average grade of students in the subject - avgrd. The subreport is in GH2.
In GF2, avgrd is showing correctly.
I want to show a variable in GF1 that will calculate the average grade of all students under the same teacher by adding all the avgrd returned from the subreport and displayed in GF2 / the number of subjects handled by that teacher.
I was able to summarize the above by using a local variable and another shared variable. In the main report using a variable that contains the following:
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 21 Nov 2011 at 5:05am
in the group header place a formula like:
shared numbervar tavrg := 0;
"" //hides the reset
just as a note, you do realize the average of a group of averages is not really the average. What would probably be a more accurate number would be to use shared variables and return the sums and counts of the classes so that an average can be computed.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum