Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: DateTime Parameter Field Problem Post Reply Post New Topic
Author Message
lshakes
Newbie
Newbie
Avatar

Joined: 17 Apr 2012
Location: United States
Online Status: Offline
Posts: 4
Quote lshakes Replybullet Topic: DateTime Parameter Field Problem
     Posted: 02 May 2012 at 12:43pm
Hey All,

I have a LaborCostAct table that contains employees and work order information.  I've set up some parameter fields that pulls out only the work orders for the specified date range.  However, I'm noticing that when I run the report it will include all work orders with dates up to my finish date parameter but does not include work orders that fall on the exact finish date. 

Below is the record selection formula that I am using.  Does anyone know why it won't show work orders that fall directly on my finish date parameter?
I thought the range would include the finish date.

{LABORCOSTACT.FINISHDATE} in DateTime ({?Start Date}) to DateTime ({?Finish Date}) and
{LABORCOSTACT.LABORNAME} = {?LaborName}

Thanks.
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 02 May 2012 at 1:29pm
it does not include the finish date
if you look at the SQL query it will show
{LABORCOSTACT.FINISHDATE}>= {?Start Date} and
{LABORCOSTACT.FINISHDATE}< {?Finish Date}

if you want to include the finish date. use
{LABORCOSTACT.FINISHDATE} >= DateTime ({?Start Date}) and
{LABORCOSTACT.FINISHDATE}<= DateTime ({?Finish Date}) and
{LABORCOSTACT.LABORNAME} = {?LaborName}
IP IP Logged
lshakes
Newbie
Newbie
Avatar

Joined: 17 Apr 2012
Location: United States
Online Status: Offline
Posts: 4
Quote lshakes Replybullet Posted: 03 May 2012 at 4:44am
Thanks for helping a newbie out.

I does what I need now.

Thanks.
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