Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Show only records containing letters Post Reply Post New Topic
Author Message
Kaiser
Newbie
Newbie


Joined: 28 Feb 2012
Online Status: Offline
Posts: 11
Quote Kaiser Replybullet Topic: Show only records containing letters
     Posted: 13 May 2013 at 12:27am
Hi
I am looking to return records from a field where the records are made up of letters and numbers. Some records are numeric e.g 1234, others are alphanumeric e.g. 1234A or TEMP123. How can I return only the ones that are alphnumeric and exclude the ones that are numeric?
 
Thanks
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 13 May 2013 at 2:54am
maybe you could do some thing like this

if IsNumeric({field}) then "" else {field}
IP IP Logged
Kaiser
Newbie
Newbie


Joined: 28 Feb 2012
Online Status: Offline
Posts: 11
Quote Kaiser Replybullet Posted: 13 May 2013 at 3:03am
Thanks bw, I tried this:
 
if IsNumeric({PROF_CARERS.MAIN_IDENT}) then "" else {PROF_CARERS.MAIN_IDENT}
 
but am getting 'A boolean is required'
IP IP Logged
Kaiser
Newbie
Newbie


Joined: 28 Feb 2012
Online Status: Offline
Posts: 11
Quote Kaiser Replybullet Posted: 13 May 2013 at 3:31am
Actually this is working for when I create a formula field, making progress now!
IP IP Logged
joeg1962
Newbie
Newbie


Joined: 01 Mar 2013
Location: United States
Online Status: Offline
Posts: 35
Quote joeg1962 Replybullet Posted: 13 May 2013 at 3:44am
I just did the following for one of my fields

if isnumeric({PERSON.MEDRECNO}) then "" else {PERSON.MEDRECNO}

and it was fine.
IP IP Logged
Kaiser
Newbie
Newbie


Joined: 28 Feb 2012
Online Status: Offline
Posts: 11
Quote Kaiser Replybullet Posted: 13 May 2013 at 4:00am

Thanks Joeg. This works fine as a formula field but is there any way of including it in the Record Selection instead? When I use it as a formula field all the other details appear apart from the ID (name, address, etc.) but I want to only display these details for those individuals with alphanumeric ids.

IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 13 May 2013 at 4:44am
if you only want to run it for cases where the medrecno is numeric, put it like this in your select record statement:

not isnumeric({PERSON.MEDRECNO})

Edited by Gurbs - 13 May 2013 at 4:44am
IP IP Logged
Kaiser
Newbie
Newbie


Joined: 28 Feb 2012
Online Status: Offline
Posts: 11
Quote Kaiser Replybullet Posted: 13 May 2013 at 4:50am
Thanks Gurbs, that appears to have done the trick.
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