Reputation: 2491
I have to develop a report which will show the student's current semester Grade, Credit for each course and student details. And Total GPA for each student on that semester. So for this, I have created Group depending on Student ID. So now the report Shows Ok but I have to calculate the GPA for each student ID which is each group in Crystal Report. The formula for GPA is:
(grade point * credit)/Sum(Credit)
I am not so sure how I can apply this formula in each group footer.
Mentioned: I am using Crystal Report 10, VB.NET, Mysql
Upvotes: 0
Views: 669
Reputation: 156
Put each student as a group then in the details you can put the credits and grade. quick outline:
//Group1 header
{t.student}
//detail
{b.course_num} {b.credit} {b.grade} {@grade}
//group1 footer
{?credit_hours} {@GPA}
//{@grade} place in details
case {b.grade}
when A then 4.00
when A- then 3.70
when B+ then 3.33
when B then 3.00
when B- then 2.70
when C+ then 2.30
when C then 2.00
when C- then 1.70
when D+ then 1.30
when D then 1.00
when D- then 0.70
else 0
//{@grade_pt} place in details
{@grade} * {t.credit}
//{@GPA} place in group footer, and create running totals
({?credit_hours}*{?grade})/{?credit_hours}
Upvotes: 0
Reputation: 26272
//{@GPA}
Sum({table.grade_point},{table.student_id}) / Sum({table.credit},{table.student_id}) / Sum({table.credit},{table.student_id})
Upvotes: 0