Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Report Design
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Report Design
Topic: select specific values from a string
Author
Message
lello
Newbie
Joined: 12 Nov 2010
Location: Lebanon
Online Status: Offline
Posts: 5
Topic: select specific values from a string
Posted: 01 Nov 2011 at 11:03pm
Hi Guys,
I am a newbie so bare on me.
We have a character field which has values like this:
test/298
testa/15
testab/8
new/39
newbie/444
I want a function to show me the numberic values only. the second part of the string. 444 or 298 or 39...
note that in each string we have the separator "/"
Can you please help me to achieve this?
Thanks
IP Logged
mro01
Newbie
Joined: 19 Oct 2011
Online Status: Offline
Posts: 3
Posted: 02 Nov 2011 at 1:42am
perhaps something like that ? define a formula with the following code:
right(strVar, len(strVar) - InStr (1, strVar, "/"));
(strVar is your value)
IP Logged
lello
Newbie
Joined: 12 Nov 2010
Location: Lebanon
Online Status: Offline
Posts: 5
Posted: 04 Nov 2011 at 12:16am
Thanks mro01. it worked :D
another request please.
Now I want the opposite, I want to display the string but not the number (without the "/" )...
what should be the expression?
Thanks
IP Logged
FrnhtGLI
Senior Member
Joined: 22 May 2009
Online Status: Offline
Posts: 347
Posted: 04 Nov 2011 at 2:08am
split({table.field},"/")[1]
Also, for the sake of simplicity, the first expression could be:
split({table.field}, "/")[2]
Edited by FrnhtGLI - 04 Nov 2011 at 2:09am
|< /\ '][' ( )
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
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
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
BAEZL
© 2004-2026 Brian Bischof. All Rights Reserved.