[英]How to calculate GPA for each group in Crystal Report?
我必須編寫一份報告,以顯示學生當前的學期成績,每門課程的學分以及學生的詳細信息。 以及該學期每個學生的總GPA。 因此,為此,我根據學生ID創建了組。 因此,現在報告顯示正常,但我必須為Crystal Report中每個組的每個學生ID計算GPA。 GPA的公式為:
(grade point * credit)/Sum(Credit)
我不確定如何在每個組頁腳中應用此公式。
提及:我正在使用Crystal Report 10,VB.NET,Mysql
//{@GPA}
Sum({table.grade_point},{table.student_id}) / Sum({table.credit},{table.student_id}) / Sum({table.credit},{table.student_id})
將每個學生分組,然后在詳細信息中輸入學分和成績。 快速概述:
//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}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.