cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports

0 Kudos

Hello, I hope you could help me.

I have in a field different palletizations with different dimensions. Now I would like to search in the field where the first number is and cut off the text before it. The numbers can be from 1-10.

Ex. Double EU 1600x800 --> Output: Double EU

Miele 800x1456 --> Miele

I had tried InStr, but fail because the numbers can contain a value from 1-9.

AlexGourdet
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you for visiting SAP Community to get answers to your questions.

As you're looking to get most out of your community membership, please consider include a profile picture to increase user engagement & additional resources to your reference that can really benefit you:

I hope you find this advice useful, and we're happy to have you as part of SAP Community!

All the best,

Alex

Accepted Solutions (0)

Answers (1)

Answers (1)

ido_millet
Active Contributor
0 Kudos

If you always have a single space in the middle:

local stringvar yourField := "Miele 800x1456";
Split(yourField, " ")[1];

Otherwise:

local stringvar yourField := "Miele 800x1456";
Local numbervar i;
Local stringvar result;
For i := 1 to Len(yourField) step 1 do
(
IF isnumeric(yourField[i]) Then Exit For;
result := result + yourField[i];
);
result;