2013-07-18 30 views
0

我必须制定一份报告,以显示学生当前学期的成绩,每门课的学分和学生的详细信息。以及该学期每个学生的总GPA。 因此,为此,我已根据学生ID创建了组。所以现在报告显示好了,但是我必须为每个学生ID(Crystal Report中的每个组)计算GPA。 GPA的公式为:如何计算Crystal Report中每个组的GPA?

(grade point * credit)/Sum(Credit) 

我不太确定如何将这个公式应用于每个组页脚。

提到:我用水晶报表10,VB.NET,Mysql的

回答

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

感谢您的回复...我试过这个公式,但它没有给出正确的结果..任何其他的想法? – barsan

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}