如何计算Crystal Report中每个组的GPA?

时间:2013-07-18 16:03:04

标签: vb.net crystal-reports

我必须制作一份报告,该报告将显示学生当前学期的成绩,每个课程的学分和学生的详细信息。并且该学期每位学生的总GPA。 所以为此,我根据学生ID创建了Group。所以现在报告显示确定,但我必须计算每个学生ID的GPA,这是Crystal Report中的每个组。 GPA的公式为:

 (grade point * credit)/Sum(Credit)

我不太确定如何在每个组页脚中应用此公式。

提到:我使用的是Crystal Report 10,VB.NET,Mysql

2 个答案:

答案 0 :(得分:0)

//{@GPA}
Sum({table.grade_point},{table.student_id}) / Sum({table.credit},{table.student_id}) / Sum({table.credit},{table.student_id})

答案 1 :(得分:0)

将每个学生作为一个小组,然后在详细信息中,您可以将学分和成绩。快速概述:

//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}
相关问题