Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Basic formula for renaming blank field strings Post Reply Post New Topic
Author Message
j_ellemore
Newbie
Newbie


Joined: 31 May 2009
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote j_ellemore Replybullet Topic: Basic formula for renaming blank field strings
    Posted: 31 May 2009 at 2:54am
Hi, can anyone help me with a basic formual to rename blank field strings/values in crystal 11.

I have a support report where one of the support team names is blank/empty. I need to replace the blank with the word EmailListener. I have tried the below and now all of the data from the report dissapears:


if {Incident.OwnerTeam}=""
then

{Incident.OwnerTeam}="EmailListener"

else

{Incident.OwnerTeam}="{Incident.Owner}"

Can anyone advise?

Many thanks
James


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 May 2009 at 7:44am
if {Incident.OwnerTeam}=""
then "EmailListener"
else
{Incident.OwnerTeam}
 
If there are any NULLS instead of "" then it would be:
if {Incident.OwnerTeam}=""  or isnull({Incident.OwnerTeam})
then "EmailListener"
else
{Incident.OwnerTeam}
 
IP IP Logged
j_ellemore
Newbie
Newbie


Joined: 31 May 2009
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote j_ellemore Replybullet Posted: 31 May 2009 at 7:54am
Thanks for the reply.

I had tried this but I get an error: "The result of a selection formula must be a boolean".

Any suggestions?

Thanks
again,
James
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 May 2009 at 8:16am
1.this is a crystal syntax formula. Do you have the fomrula field set to Crystal syntax?
2. this is not to be used in your select expert but rather as formula field. You can then use the formula field for your display, grouping, summing or whatever instead of the original field.
IP IP Logged
j_ellemore
Newbie
Newbie


Joined: 31 May 2009
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote j_ellemore Replybullet Posted: 31 May 2009 at 9:13am
Makes perfect sense now, that is what I was doing wrong.

Thanks!
James
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.016 seconds.