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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output strings with delimiter 1

Status
Not open for further replies.

Buckaroo8

Programmer
Aug 6, 2003
27
US
Hi,
How do I out put a list from a string field with the criteria (length of text) determined by a delimiter of a ';'?

Ex: A for Apple; B for Banana; C for crouton

Output:
A for Apple
B for Banana
C for Crouton

I am planning to have this in the Details section of my report.

Thanks for all suggestions!
 
I am not sure if this is what you are looking for but here is my suggestion.

If you know the exact length you can use a formula like this

{Table.field} [1]

This will only return the first character from the string field.


Kchaudhry
 
Well,
That's close, but I need everything from the left to the ';', then everything from ';' to ';', and so on...

Go fish!

:)
 
Ok, try using this:

Left({table.field},Instr({table.field},";")-1)

This will return you everything in the string field besides the ";"

Hopefully this is what you are looking for.

Kchaudhry
 
This is Crystal version dependent, but you might want to just use:

join(split({table.field},";"),chr(13))

This will have a limitation of 254 characters in CR 8.5 and below.

-k
 
HooYah synapsevampire !!!

That's it !
Sprinkle a little 'Can Grow' onto the field and I got what I needed!

As a humble and final request to this isse, would you mind explaining how the formula works?

Many great Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top