Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Select Expert: If any of the fields matches parame Post Reply Post New Topic
Author Message
bowja
Newbie
Newbie
Avatar

Joined: 07 Dec 2009
Location: Australia
Online Status: Offline
Posts: 31
Quote bowja Replybullet Topic: Select Expert: If any of the fields matches parame
     Posted: 05 Jan 2010 at 4:52am
Happy New Year,
 
I am have trouble with or statements in select expert. I want results if any one of four fields has a date rate in the last7days. When I combine all four in one report all the results do no show up (i have checked manually from the database). i.e.
 
{JobOrder.PositionType} = "Temp" and
({JobOrder.OrderDate} in WeekToDateFromSun or
{JobOrder.FilledDate} in WeekToDateFromSun or
{JobOrder.StartDate} in WeekToDateFromSun or
{JobOrder.EndDate} in WeekToDateFromSun)
 
This only returns 94 of the 103 results. However if I run two reports:
 
1)
{JobOrder.PositionType} = "Temp" and
({JobOrder.OrderDate} in WeekToDateFromSun or
{JobOrder.FilledDate} in WeekToDateFromSun)
 
2)
{JobOrder.PositionType} = "Temp" and
({JobOrder.StartDate} in WeekToDateFromSun or
{JobOrder.EndDate} in WeekToDateFromSun)
 
Then export to excel and remove the duplicates i.e. filled and end in the weektodatefromsun, I get the correct total of 103 results.
 
I would really like one report to bring up all unique records that meet one or more of the parameters.
 
p.s. please explain in simple terms as i am quite new to this!
If you think you can or think you can't you are right - Paraphrased quote Henry Ford
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Jan 2010 at 4:47pm
Your seelct statement looks fine. It probably has to do with NULLS.
Try changing your report to use defaults for NULLS
IP IP Logged
bowja
Newbie
Newbie
Avatar

Joined: 07 Dec 2009
Location: Australia
Online Status: Offline
Posts: 31
Quote bowja Replybullet Posted: 07 Jan 2010 at 2:16am
Thanks all sorted
If you think you can or think you can't you are right - Paraphrased quote Henry Ford
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