Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# Sequence gap in alpha-numeric field

Posted on 2006-11-29
Medium Priority
442 Views
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
Question by:toddcolson
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 7
• 7

LVL 101

Expert Comment

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

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 101

Expert Comment

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

Author Comment

ID: 18042701
I get field is required here message after:    Previous(
0

LVL 101

Expert Comment

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

ID: 18042814
Now: To many arguments have been given to this function.
0

LVL 101

Expert Comment

ID: 18042826
Sorry.

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

mlmcc
0

Author Comment

ID: 18042890
Now: The string is non numeric
0

Author Comment

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

Author Comment

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 101

Expert Comment

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

mlmcc
0

Author Comment

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 101

Expert Comment

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

mlmcc
0

LVL 101

Accepted Solution

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

mlmcc
0

## Featured Post

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customerâ€™s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. â€¦
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater â€¦
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for â€¦
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompaâ€¦
###### Suggested Courses
Course of the Month12 days, 5 hours left to enroll