Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Solved: Select Criteria help (or / not) Post Reply Post New Topic
Author Message
Erik
Groupie
Groupie
Avatar

Joined: 05 Dec 2013
Online Status: Offline
Posts: 50
Quote Erik Replybullet Topic: Solved: Select Criteria help (or / not)
     Posted: 07 May 2014 at 8:17am
I'm trying to get a particular set of select criteria, and not having luck.
 
My goal is to pull all entries except where a couple of "likes" exist AND to also excluse another "like" only if performed by a particular system account.
 
Here are a couple examples I've tried that are not returning accurate data.
 
 
Example #1:
 
The "or" basically includes everything since both portions are using "not", and whatever one doesn't include, the other does.
 
If i use "and" instead of "or" it applies my system account restriction to all entries, not just those that I want.
 
I tried breaking them apart with parentheses, but if using all "ands" Crystal gets rid of my parentheses.
 
(
  not ({act_log.action_desc} like "*to '" & {@ActivityLastFirst} & "*") and
  not ({act_log.action_desc} like "*to '*" & "Pending*") and
)
or
(
  {@ALGAnalyst} = "Web Request" and
  not ({act_log.action_desc} like "*from 'Authorization, Pending*") and
)
 
 
Example #2:
 
Excludes entire entries that used to exist.
 
not ({act_log.action_desc} like "*to '" & {@ActivityLastFirst} & "*") and
not ({act_log.action_desc} like "*to '*" & "Pending*") and
if {@ALGAnalyst} = "Web Request" then
not ({act_log.action_desc} like "*from 'Authorization, Pending*")


Edited by Erik - 07 May 2014 at 8:28am
IP IP Logged
Erik
Groupie
Groupie
Avatar

Joined: 05 Dec 2013
Online Status: Offline
Posts: 50
Quote Erik Replybullet Posted: 07 May 2014 at 8:28am
Figures that I would solve this right after posting. Sometimes it just helps to mix up the thought process.
 
not ({act_log.action_desc} like "*to '" & {@ActivityLastFirst} & "*") and
not ({act_log.action_desc} like "*to '*" & "Pending*") and
(
  {@ALGAnalyst} <> "Web Request" or
  (
    {@ALGAnalyst} = "Web Request" and
    not ({act_log.action_desc} like "*from 'Authorization, Pending*")
  )
)


Edited by Erik - 07 May 2014 at 8:31am
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