cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports: Select minimum record only

Former Member
0 Kudos
598

I have a table that holds unique "entries" related to help desk tickets. Each entry is given a sequence number (assigned ascending for each entry regardless of ticket association). So, a ticket ID can have multiple entry records with ascending numbers. I need to be able to list the ticket id and only the first entry, which would be the min value of all entries. For instance:

CALLID CALLSEQ DATE TIME

0011 91038 01/01/18 8:10am

0011 91041 01/01/18 9:30am

0012 91053 01/01/18 8:45am

0012 91059 01/02/18 3:45pm

I need to return the following:

CALLID CALLSEQ DATE TIME

0011 91038 01/01/18 8:10am

0012 91053 01/01/18 8:45am

Ultimately, I need to evaluate ticket open date/times against the first entry date/time and display the DateDiff. Thanks in advance!!

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Adam,

1. Insert a group on the Call ID field.

2. Move all fields from the Details to the Group Header

3. Suppress the Details and Group Footer.

4. Go to the Record Sort Expert > Add the DateTime field in the sort list and sort in Ascending order.

-Abhilash

Former Member
0 Kudos

This is how I started my report at first. Unfortunately, my ultimate goal is to build a SELECT CASE formula that grouped DateDiff in Under 24 hours, between 24 and 48 hours, and over 48 hours. When I apply the following group selection formula, all my data gets duplicated. For instance, if a ticket has multiple entries whose DateDiff falls into each group, it will get multiple instances. Any way to product the same data but grouped one level above the CALLID? Thanks.

Answers (0)