Print Page | Close Window

Basic formula for renaming blank field strings

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6524
Printed Date: 02 May 2024 at 4:24pm


Topic: Basic formula for renaming blank field strings
Posted By: j_ellemore
Subject: Basic formula for renaming blank field strings
Date 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





Replies:
Posted By: DBlank
Date 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}
 


Posted By: j_ellemore
Date 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


Posted By: DBlank
Date 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.


Posted By: j_ellemore
Date Posted: 31 May 2009 at 9:13am
Makes perfect sense now, that is what I was doing wrong.

Thanks!
James



Print Page | Close Window