Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Alphabet Post Reply Post New Topic
Author Message
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Topic: Alphabet
    Posted: 11 Mar 2012 at 11:53pm
Hi all,

I have a qustion. I have a list of customer names. Now I want to add a collecter, but I want this based on the name of the customer. I want the collecter to be 'Dagmar' if the names starts with the letters A, and R untill Z. If it is anything else, I want it to be 'Inge'. Can anybody help me write this formula?

Thanks in advance

King regards,

Gerben
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 12 Mar 2012 at 12:28am
if uppercase(left({table.customername},1)) in ["A","R","S","T","U","V","W","X","Y","Z"]
then "Dagmar"
else "Inge"
 
That will work provided the first letter in the customername string is the letter you want to take into consideration, ie if you want the first letter of the surname the above formula will only work if your string is as follows;
 
Surname, Firstname
 
it won't work if the string is;
 
Firstname Surname
 
Regards,
Ryan.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.