Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Grab Top Record of Each Occurrence Post Reply Post New Topic
Author Message
joesmithf1
Newbie
Newbie


Joined: 03 May 2010
Location: United States
Online Status: Offline
Posts: 4
Quote joesmithf1 Replybullet Topic: Grab Top Record of Each Occurrence
     Posted: 19 Jul 2010 at 12:27pm
Hi All,

I am fairly new to Crystal, so still trying to learn. i am creating a report where i am able to get some good results, but now i am getting duplicates. Please see sample results:


0000018573 15 01 12/31/9999 1415 01FNR GARY JAMES
0000018573 15 01 12/31/9999 1415 01FNA GARY JAMES
0000018573 15 01 12/31/9999 1415 01FBE GARY JAMES
0000018574 15 01 12/31/9999 1415 01FNA Tom Smit
0000018574 15 01 12/31/9999 1415 01FNR Tom Smit
0000018574 15 01 12/31/9999 1415 01FBE Tom Smit

Notice there are 3 records for James. This is b/c he has 01FNR, 01FNA, and 01FBE. My question is, how to i display only the top record OF EACH INDIVIDUAL in the report(if he/she has duplicates)? I tried Group Expert on ID(0000018573) then Section Expert and 'hide' Drill Down, but that only give me his ID(0000018573) on the report; i 15,01,12/31/999, 1415, and GARY JAMES on the report as well.
 
End result of above example should look like this:
 
0000018573 15 01 12/31/9999 1415 01FNR GARY JAMES
0000018574 15 01 12/31/9999 1415 01FNA Tom Smit


Thankyou.
Joe
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 19 Jul 2010 at 7:25pm
you can group by first column (or other column except date and 6th column).
and put all other fields in group section as well.
 
here is the result that I got.
before grouped:
18573   15   1   31/12/9999 00:00:00   1415   01FNR   GARRY JAMES
18573   15   1   31/12/9999 00:00:00   1415   01FNA   GARRY JAMES
18573   15   1   31/12/9999 00:00:00   1415   01FBE   GARRY JAMES
18574   15   1   31/12/9999 00:00:00   1415   01FNA   TOM SMIT
18574   15   1   31/12/9999 00:00:00   1415   01FNR   TOM SMIT
18574   15   1   31/12/9999 00:00:00   1415   01FBE   TOM SMIT

after grouped by first column:
18573.00
18573   15   1   31/12/9999 00:00:00   1415   01FNR   GARRY JAMES
18573   15   1   31/12/9999 00:00:00   1415   01FNA   GARRY JAMES
18573   15   1   31/12/9999 00:00:00   1415   01FBE   GARRY JAMES

18574.00
18574   15   1   31/12/9999 00:00:00   1415   01FNA   TOM SMIT
18574   15   1   31/12/9999 00:00:00   1415   01FNR   TOM SMIT
18574   15   1   31/12/9999 00:00:00   1415   01FBE   TOM SMIT

modify the layout by moving other fields:
18573.00  15   1   31/12/9999 00:00:00   1415   01FNR   GARRY JAMES
18573  
18573  
18573  

18574.00  15   1   31/12/9999 00:00:00   1415   01FNA   TOM SMIT
18574  
18574  
18574  
then delete the field in detail section (or you can hide it).

hope it help.
 


Edited by Emir_W - 19 Jul 2010 at 8:40pm
Emir W
IP IP Logged
joesmithf1
Newbie
Newbie


Joined: 03 May 2010
Location: United States
Online Status: Offline
Posts: 4
Quote joesmithf1 Replybullet Posted: 20 Jul 2010 at 4:43am
omg! that was so simple! i did not know you can 'move' the other fields up after you group one field.  Thank you so much!
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