Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Wrong Data on Filtering Post Reply Post New Topic
Author Message
dlovejoy
Newbie
Newbie
Avatar

Joined: 18 Feb 2010
Location: United States
Online Status: Offline
Posts: 2
Quote dlovejoy Replybullet Topic: Wrong Data on Filtering
    Posted: 18 Feb 2010 at 11:32am

I am attempting to select employees that are active.  My selection is start date >=01/01/2010 and employee-emp.status like A.

I pick up terminated employees.
 
Any idea what I am doing wrong?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 18 Feb 2010 at 12:55pm
It looks correct, of course without knowing what the data for {employee-emp.status} looks like, it would be hard tell if you are picking up a terminated status that has a 'A' in it.
IP IP Logged
dlovejoy
Newbie
Newbie
Avatar

Joined: 18 Feb 2010
Location: United States
Online Status: Offline
Posts: 2
Quote dlovejoy Replybullet Posted: 18 Feb 2010 at 1:58pm

These are status codes we use for our employees.  They are A, L or T with a number after them.  A = Active, L = Leave, T=Terminated.

Not sure why it is not just picking up the "A"s.
 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 18 Feb 2010 at 2:10pm
It is a mystery to me.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Feb 2010 at 2:55pm

You described them as a A, L or T with a number after them

If that is the case your LIKE would have to a use the wildcard to handle the 'numbers after them'. That being said I would have thought your select statment as is would exclude all records rather than incluide the extra ones...
{table.startdate} >= Date(2010,01,01) and {employee-emp.status} like "A*"
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.