Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to extract part of a string? Post Reply Post New Topic
Author Message
jchan
Newbie
Newbie
Avatar

Joined: 23 Jun 2009
Online Status: Offline
Posts: 5
Quote jchan Replybullet Topic: How to extract part of a string?
     Posted: 29 Jun 2009 at 10:00am

I’m trying to extract a portion of a string that is delimited? I have a formula that concatenates three fields delimited by a comma. The concatenation allows me to distinctly identify a particular industry group a customer belongs to.

There are three fields in a customer record that I am interested in using, the source system it comes from, the customer number, and the industry group it belongs to. My concatenated string ({@industryIdentifier}) looks like this:

 

industry1, cust1, system1

industry2, cust2, system2

industry3, cust2, system2

industry3, cust3, system3

industry1, cust4, system1

industry2, cust5, system3

 

When I use the Split function; Split (({@industryIdentifier}, “,”, 1), I get the following message “The result of a formula cannot be an array”.  Can this be done?

 
I want just the industry portion of the concatenated string to be returned with the split.

 

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Jun 2009 at 11:19am
try:

Edited by DBlank - 29 Jun 2009 at 11:20am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum