Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: If statement question. Post Reply Post New Topic
Author Message
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Topic: If statement question.
    Posted: 17 Mar 2010 at 6:19am
Newbie here. I have been put in charge of our Crystal Reports part of the IT department here at my job. My training is limited but I feel I am a quick learner. I am sort of stuck on the following. I need something like this:

If This.field is not null then show this statement:
"Hey, I want to tell you about: " This.field

Also If This.field is not null AND includes "Other" then please add That.field.


Help!!! Shocked
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 17 Mar 2010 at 6:40am
Try:
 
if not isnull({this.field})
then "Hey, I want to tell you about: " & {This.field}
else
if not isnull({this.field})
and "other" in {this.field}
then "Hey, I want to tell you about: " & {This.field} & " " & {that.field}
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 17 Mar 2010 at 7:58am
Not quite going to work right.  The first if statement will need to include 'and not("other" in {this.field}'.  Otherwise the first isnull({this.field}) will never 'see' the second if.  Of couse you could reverse the if statements and get the correct result.
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 17 Mar 2010 at 8:48am

Thanks for the correction.

IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 17 Mar 2010 at 8:52am
Very huge thank you's!!!!! Clap
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.