Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula for showing different letters Post Reply Post New Topic
Author Message
bb512
Newbie
Newbie
Avatar

Joined: 30 Aug 2009
Location: United States
Online Status: Offline
Posts: 3
Quote bb512 Replybullet Topic: Formula for showing different letters
     Posted: 30 Aug 2009 at 3:15am
Hey guys,

I am new in here, I guess this is the most completed crystal forum out there. I have the following question. I am working with a table where I have numbers in one field, so I need crystal to show different letters in another @field (formula if true, or nothing if false). IE, if {field}=615 then {@field}=A else {@field}=null. (in this case, I want crystal to show me an "A" if the field # is 615. I'll appreciate all tips and answers.

Thanks!
BB512
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Aug 2009 at 12:44pm

formulas in crysal cannot return NULL but can return an empty string.

Create a formula field named whatever you want using the formula:
If {table,field}=615 then "A" else ""
IP IP Logged
bb512
Newbie
Newbie
Avatar

Joined: 30 Aug 2009
Location: United States
Online Status: Offline
Posts: 3
Quote bb512 Replybullet Posted: 31 Aug 2009 at 2:33pm
It worked great! the only thing that I needed to add was an apostrophe before and after 615.

Thanks a lot!!!
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