Solved

Sequence gap in alpha-numeric field

Posted on 2006-11-29
14
436 Views
Last Modified: 2010-08-05
I have a field with data formated : AB002200, AB002201, AB002203, AB002204, AB002206, etc. The first two characters are always AB followed by 6 numbers. I want a formula to find gaps in the numeric sequence portion of this data. (for example AB002205 is missing in my sample data) I have Crystal Reports 8.5
0
Comment
Question by:toddcolson
  • 7
  • 7
14 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 18042128
Try this
Put the field in the detail section
Right Click the left margin of the detail section
Click FORMAT SECTION
Click the format button next to SUPPRESS
Formula is
   PreviousIsNull({YourField}) or (ToNumber(Right({YourField,6)) - 1 = (Previous(ToNumber(Right({YourField,6)))

mlmcc

0
 

Author Comment

by:toddcolson
ID: 18042399
I get matching } for this field name is missing, if I add the brackets to the field name I get the ) is missing.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18042564
Sorry { } go around the Crystal field names.

Try this one
 PreviousIsNull({YourField}) or (ToNumber(Right({YourField},6)) - 1 = (Previous(ToNumber(Right({YourField},6)))))

mlmcc
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:toddcolson
ID: 18042701
I get field is required here message after:    Previous(
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18042792
That's what I get for copying.

PreviousIsNull({YourField}) or (ToNumber(Right({YourField},6)) - 1 = (ToNumber(Right(Previous({YourField},6)))))

mlmcc
0
 

Author Comment

by:toddcolson
ID: 18042814
Now: To many arguments have been given to this function.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18042826
Sorry.

PreviousIsNull({YourField}) or (ToNumber(Right({YourField},6)) - 1 = (ToNumber(Right(Previous({YourField}),6))))

mlmcc
0
 

Author Comment

by:toddcolson
ID: 18042890
Now: The string is non numeric
0
 

Author Comment

by:toddcolson
ID: 18042923
Wait, It works!, Now I got it. Thanks
0
 

Author Comment

by:toddcolson
ID: 18042965
It works, but I need a formula that creates a report that continues to show all of the data in the field and somehow marking the gaps. Is that possible?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18043118
Yes.  How do you want the gaps marked?

mlmcc
0
 

Author Comment

by:toddcolson
ID: 18043176
Maybe like a formula field with the word missing at the gap. Or highlighting. Any report that keeps all the data in the field while at the same time showing the gaps.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18043328
Let me think about it.  Rather late here now.

mlmcc
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 18228242
Do you still need assistance with this?

mlmcc
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question