Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Finding gaps in number sequences Post Reply Post New Topic
Author Message
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Topic: Finding gaps in number sequences
     Posted: 30 Jun 2014 at 6:29am
Hi, I'm using Crystal 2008. The objective of my report is to identify when there are gaps in a sequence. 
 
The report is grouped on Employee, then position level, and looks like this:
 
Employee ID    Position Level
12345              1
12345              2
44444              1
44444              3
 
In this example, I need to identify that Employee ID 44444 has a gap in the position level sequence. I thought of putting this in a crosstab and then just eyeballing the report for issues, but this is going out to a customer and they'd prefer to just see the problem employees appear on the report only.
 
Any suggestions are welcome. Thanks
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 30 Jun 2014 at 6:33am
maybe
count(Position Level, Employee ID) <> max(Position Level,Employee ID)
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 30 Jun 2014 at 6:37am
That may work if there were only 3 levels total. But there could be a total of 5 levels to evaulate. An employee may have 1,3,5, for example. 
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 30 Jun 2014 at 11:57am
this
count(Position Level, Employee ID) <> max(Position Level,Employee ID)

should work still as if employee has 1,3,5 then
count(Position Level, Employee ID) = 3
max(Position Level,Employee ID) = 5


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