Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing number in a string sequence

Status
Not open for further replies.

turtlepatch

Programmer
Apr 13, 2005
16
US
I have a problem similar to thread149-912093 except that my sequence of invoices are strings.

Basically I have a list of InvoiceID's that are sequential, however, I need to identify the one's that have been deleted. For example...

10001
10002
10004
10005
10007

I need to be able to have the missing 10003 and 10006 displayed.

I've tried using the solution in the thread mentioned above, changing my InvoiceID to number with tonumber(), but it tells me that the string is non-numeric.

I am using Crystal Reports 11 and am using an ODBC connection to our Hagen database.
 
Is the invoice ID a string? Does the ID have any other text that forms part of it?

Try using VAL() which will take the numeric value from the left up until it reaches any non-numeric characters.

'J

CR8.5 / CRXI - Discovering the impossible
 
ToNumber(Trim({YourField})) or Val({YourField})

One or both of these should work.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top