Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Specific Formula for calculating average Post Reply Post New Topic
Author Message
Afi83
Newbie
Newbie


Joined: 08 Oct 2009
Online Status: Offline
Posts: 7
Quote Afi83 Replybullet Topic: Specific Formula for calculating average
    Posted: 13 Oct 2009 at 8:09am
Hi there

I want to do something like this in formula field.
I want to calculate average on specific records on my reports. This is for calculating average grades of students.
I want to do like this:
If {course.courseName}(i)={course.courseName}(i+1) then
GradeMax=max{grades.grade}
This code is for incorporating the max marks of each student in each course.

I want to separate the specific grades of each student for other weighting (such as .05):
This is the code I want to do:
If {course.CourseName}="Math" then
Math2=math*0.5
I want to use this number for calculating overall average.

Lastly for calculating the overall average I want to calculate other grades averages and then multiply by these specific numbers:
Average=grademax+math2+otherGrades In recordes/recordsNum

How can I do something like this in Crystal report?

Thanks for any helps

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 14 Oct 2009 at 7:05am
this is a very complex idea.  You would probably need to run several arrays at the same time, to store values and counts and to give you chance of getting the result that you want.
 
I don't think that I would want to tackle this anytime soon.  A stored procedure would probably give you much nicer results.
 
Sorry I can't be or more help.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.016 seconds.