Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Display data on same row but different column and Post Reply Post New Topic
Author Message
ekipongi
Newbie
Newbie
Avatar

Joined: 16 Jan 2013
Location: Papua New Guinea
Online Status: Offline
Posts: 3
Quote ekipongi Replybullet Topic: Display data on same row but different column and
     Posted: 16 Jan 2013 at 3:51pm

I’m trying to display a weekly attendance report for a class; attendance is every Saturday for 13 weeks. My report’s data will come from a view in MS SOL Server 2008. I have a situation where a particular person from a class can attend classes at each Saturday. He can be either present, Absent or Sick for any of the 13 Saturdays. The report is displayed as wanted as shown in the screen shot. 


Name                            L10    L11     L12     L13

Pete                                         A                             
Luke                                         S
Mat                               P
Pete                             S
Luke                             P

However, I just want the name of the person not to be repeated and the attendance details (Present, Absent, sick) to be in a single row where the name of the person is listed instead of repeating the person’s name with the new attendance.

Above is the report as it is currently displayed. I just want the report to be something like shown below. Similarly, if there are data for L12 then, the data should be displayed adjacent to L11 within the individual concerned name listed. 


Name                            L10    L11     L12     L13

Pete                             S          A                             
Luke                             P          S
Mat                               P

Await your favorable respond.


Edited by ekipongi - 16 Jan 2013 at 4:20pm
Nothing is too Hard
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 16 Jan 2013 at 8:28pm
Hi

Create a crosstab report..

Place student name on Rows, Weeks on Columns and  attendance in summarized field.


Thanks,
Sastry
IP IP Logged
ekipongi
Newbie
Newbie
Avatar

Joined: 16 Jan 2013
Location: Papua New Guinea
Online Status: Offline
Posts: 3
Quote ekipongi Replybullet Posted: 17 Jan 2013 at 2:04pm
Thank you very much Sastry, it worked. However, just a minor issue which I guess you'd be able to assist. When I generate the report it is shown as below:

Name                L10    L11   L12
Pete                   S        A
Luke                   P        S
Mat                     P        S

For Mat's L12 attendance it should be blank as it doesn't have any value at all. It's just blank. Instead S is being displayed which is incorrect. How do I make it to be blank.

Please assist at your earliest.

Thanking you in advance.


Edited by ekipongi - 22 Jan 2013 at 12:14pm
Nothing is too Hard
IP IP Logged
ekipongi
Newbie
Newbie
Avatar

Joined: 16 Jan 2013
Location: Papua New Guinea
Online Status: Offline
Posts: 3
Quote ekipongi Replybullet Posted: 22 Jan 2013 at 12:31pm
Hello,
In addition to the above, I have tried all means to get my report working but to no avail so it's better I post the exact issue with the exact data here for your assistance. My report's data is from a MS SQL View as shown below (note, first row is the field names):

Name                  Lesson              Attendance     TPR        TAB        TSK
Pete                       L10                     S                  2            1           5            
Luke                       L10                     P                  2            1           5
Mat                         L10                     P                  2            1           5
Pete                       L11                     A                  1             3           0
Luke                       L11                     S                  1             3           0
Mat                         L11                     P                  1             3           0

Please note that the above data table shows that for a Particular lesson the attendance for each member is different. However, the TPR, TAB and TSK are all same for the same lesson, it will not and it doesn't change. For the same lesson these fields will have the same value all through each member name.

Now within crystal reports, I want to have a report as shown below:

Name          L10         L11        
Pete             S             A
Luke             P             S
Mat               P             P
TPR               2             1            
TAB               1             3
TSK               5             0

Gurus, Please assist as I really need this to work for my church program.

Thanks in advance.


Edited by ekipongi - 22 Jan 2013 at 12:32pm
Nothing is too Hard
IP IP Logged
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