Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Select last record from each group Post Reply Post New Topic
Author Message
rusmanicai
Newbie
Newbie
Avatar

Joined: 14 Sep 2011
Location: United States
Online Status: Offline
Posts: 17
Quote rusmanicai Replybullet Topic: Select last record from each group
    Posted: 01 Jul 2013 at 3:46am
Good Morning!
I am trying to create a report of all employees and their last login process code.
I have three tables to work with:
1. Employee (PK EmployeeCode)
2. Production (PK Code-index key, assigned every time a new line is added to the table- not the employee code, although that field is part of the table structure)-lists all employees and all processes they clocked into for every day
3. ShopLogIn (PK EmployeeCode) - lists last time the employee clocked in with any process.
My report needs to show:
EmployeeName, EmployeeCode -Employee table
LastLoginTime-ShopLogIn table or Production table
LastProcess -Production Table

How can I get that? I grouped the records in the production table by employee code and in my details section I see all records for each employee, in descending order by the date stamp on each process they clocked into. How can I suppress everything except for the last process for each group?    

Thank you!
Julia.

Edited by rusmanicai - 01 Jul 2013 at 9:19am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 01 Jul 2013 at 10:18am
Suppress the details section.  Put the detail data that you want to see in a Group Header section.  Since you've sorted in descending order, this will display the first set of detail data for the group.  If you had sorted in ascending order, you would put the data in the Group Footer section because the most recent date would be the last one in the group.
 
-Dell
IP IP Logged
rusmanicai
Newbie
Newbie
Avatar

Joined: 14 Sep 2011
Location: United States
Online Status: Offline
Posts: 17
Quote rusmanicai Replybullet Posted: 01 Jul 2013 at 10:53am
Wow. I tried so many things, including this, but I have two groups, and I put the data in the first group (department) and not the second group (employee). Thank you!
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.094 seconds.