Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: If statement help Post Reply Post New Topic
Author Message
PJJDP
Newbie
Newbie


Joined: 14 Aug 2009
Location: South Africa
Online Status: Offline
Posts: 3
Quote PJJDP Replybullet Topic: If statement help
     Posted: 04 Mar 2010 at 1:00am
Hi,

I'm quite new to crystal. So learning quite a lot.

I need to select certain values in a field based on a parameter. When the selection is No it must exclude those 4 values else show everything.

Please help.

if {?Show completed/Cancelled?} = "N" then ({CR073_ISSUES.CR073_ISSUE_STS} <> "C" or {CR073_ISSUES.CR073_ISSUE_STS} <> "T" or {CR073_ISSUES.CR073_ISSUE_STS} <> "R" or {CR073_ISSUES.CR073_ISSUE_STS} <> "X")
else {CR073_ISSUES.CR073_ISSUE_STS} <> " "

Any help is appreciated.

Regards

IP IP Logged
razzak
Newbie
Newbie
Avatar

Joined: 03 Mar 2010
Location: India
Online Status: Offline
Posts: 34
Quote razzak Replybullet Posted: 04 Mar 2010 at 3:41am
can u plz explain u r problem in detail.
Razzak Sayyed
IP IP Logged
PJJDP
Newbie
Newbie


Joined: 14 Aug 2009
Location: South Africa
Online Status: Offline
Posts: 3
Quote PJJDP Replybullet Posted: 04 Mar 2010 at 3:44am
The problem is that the above if statement does nothing. The report just show all records regardless if it's a yes or a no.
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 04 Mar 2010 at 5:28am
Is the parameter passing a "N" or "NO"?
 
You could try:
 
({?Show completed/Cancelled?} = "N"
and
({CR073_ISSUES.CR073_ISSUE_STS} <> "C"
or
{CR073_ISSUES.CR073_ISSUE_STS} <> "T"
or
{CR073_ISSUES.CR073_ISSUE_STS} <> "R"
or
{CR073_ISSUES.CR073_ISSUE_STS} <> "X"))
 
or

({?Show completed/Cancelled?} = 'Y' 
and
{CR073_ISSUES.CR073_ISSUE_STS} <> " ")
 
May be a bit much, but this style typically works well for my needs.


Edited by FrnhtGLI - 04 Mar 2010 at 5:29am
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