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

StripString Function gone in Crystal 11? 3

Status
Not open for further replies.

dianemarie

Instructor
Jul 11, 2001
583
0
0
US
Hello, we have data in a client table where we will add three asterisks at the end of the name to indicate the client does not want the fact that they do business with us advertised. Example: Client Name*** (It's old data going back many years from an old system.) When running reports, we have a parameter to exclude these clients. In order to flag these clients, we use this formula with StripString:

Length({up_UsageByList;1.Name})- Length(StripString({up_UsageByList;1.Name},"*"))> 0

The logic progresses that if the answer is True, then that client is excluded. But Crystal 11 doesn't accept StripString. Can someone point me towards a function that will work? I'm under the gun! Thank you so much for any help.
 
Try:

Length({up_UsageByList;1.Name})- Length(Replace({up_UsageByList;1.Name},"*",""))> 0

-LB
 
Hi
try the following

Length({up_UsageByList;1.Name})- Length(Split({up_UsageByList;1.Name},"*")[1])> 0

thank you
keerthana
 
Stripstring isn't a Crystal function, probably a UFL (3rd party).

You over complicated it anyway, just use:

right(trim({table.field}),1) = "*"

The equivalent of your stripstring would be:

replace({table.field},"*","")

-k
 
Thank you everyone. K, I went with yours because it's beautifully simple and works! I love when that happens.

Note to K. I posted something last week about GetWord and you stated that also wasn't a Crystal Function. I didn't design these reports (I'm backup to our report developer and I'm helping convert reports to version 11 - which is when this stuff comes up). I'm not sure what a UFL is (is it similar to a custom function?), but I'm pretty sure she didn't use a 3rd party tool. I can't find GetWord or StripString anywhere in the Help system but if you type them into a formula, they turn blue in Crystal 9 (indicating they're valid functions, right?). Any hoo, just wondering - I'll ask her when she gets back. Again, thanks so much for sharing your knowledge! Diane
 
A UFL is a user function library, many of which can be downloaded or you can write them to add functions to CR.

Generally a bad idea these days, but there's still some uses for them.

-k
 
The report writer confirmed that she downloaded them years ago, maybe as far back as version 7. They have upgraded OK until 11. We will be finding built-in Crystal functions for any others we find going forward. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top