Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help with formula and String Post Reply Post New Topic
Author Message
lostwithcrw
Newbie
Newbie


Joined: 16 Mar 2010
Online Status: Offline
Posts: 2
Quote lostwithcrw Replybullet Topic: Help with formula and String
     Posted: 16 Mar 2010 at 2:26am
So I am fairly new to Crystal and struggling with formula.

I have a report that I need to edit. The field name is as follows {pr_GeneratePatAptCalendarRpt;1.Short Desc 2}

This returns the name of the short description (Complex Treatment for exmaple)

Instead of this value though I want it just to say treatment

I have tried several things but all I get is true or false

I have tried {pr_GeneratePatAptCalendarRpt;1.Short Desc 1} = "Treatment"

Any help really apprecaited



Edited by lostwithcrw - 16 Mar 2010 at 2:36am
IP IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet Posted: 16 Mar 2010 at 3:05am
This is a simple solution. There are others.

if {pr_GeneratePatAptCalendarRpt;1.Short Desc 2}="Complex Treatment" then "Treatment"

To add other options to the formula use "else"

if {pr_GeneratePatAptCalendarRpt;1.Short Desc 2}="Complex Treatment" then "Treatment" else

if {pr_GeneratePatAptCalendarRpt;1.Short Desc 2}="Example B" then "B"
IP IP Logged
lostwithcrw
Newbie
Newbie


Joined: 16 Mar 2010
Online Status: Offline
Posts: 2
Quote lostwithcrw Replybullet Posted: 16 Mar 2010 at 3:58am
Perfect, thats great. Thank you so much.



Edited by lostwithcrw - 16 Mar 2010 at 4:45am
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