Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: unique rows have the same value Post Reply Post New Topic
Author Message
anhth
Newbie
Newbie


Joined: 26 Dec 2010
Location: Vietnam
Online Status: Offline
Posts: 2
Quote anhth Replybullet Topic: unique rows have the same value
    Posted: 26 Dec 2010 at 1:37pm
Hi !
I have a mark table with 4 column as below:

studentID | subject-class | subject-name | mark
001             a01                  a                  5
001             b01                  b                  6
001             a02                  a                  7

one student learned at 2 seminar with the same subject(a).Then, that student had 2 results(5,7). The old result still saved in database. How can i recognize the same subject at report, and choose to calculate the average result in mark column. This case the average point is (7+6)/2.
Thanks!

Edited by anhth - 26 Dec 2010 at 1:39pm
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 26 Dec 2010 at 6:52pm
You can try

1: first group by studentID, then
2: group by subject-name

Then you can take the average of each mark by subject-name group. If the student has attended only one seminar then it it wouldn't make a difference.
IP IP Logged
anhth
Newbie
Newbie


Joined: 26 Dec 2010
Location: Vietnam
Online Status: Offline
Posts: 2
Quote anhth Replybullet Posted: 26 Dec 2010 at 10:07pm
thanks for reply, but it's still not solved my problem. it calculate all of mark. I have a idea ,Can you help me? after I group by subject then i group by mark. Now, mark-group of subject "a" has 2 row(ascending). If i can create a formula field call "unique-mark" from the first row of mark-group. Then, i can take average on "unique-mark".
Thanks!
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 29 Dec 2010 at 3:14am
Yes, you can create a summary for the group that you want.

Edited by Keikoku - 29 Dec 2010 at 3:14am
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.031 seconds.