Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Count Between TimeValue Range Post Reply Post New Topic
Author Message
zloggins
Newbie
Newbie


Joined: 21 Jul 2008
Online Status: Offline
Posts: 2
Quote zloggins Replybullet Topic: Count Between TimeValue Range
    Posted: 21 Jul 2008 at 1:43pm
I am trying to look at this field {ENTER_TRANSPORT.RECEIVED}

and find all records with a timevalue of 07:00:00 to 18:59:59 to get a total of records for this shift.

Then all the records for 19:00:00 to 06:59:59 and get that total.

Any ideas?

Here is what I did try:
@DAY_SHIFT = TimeValue({ENTER_TRANSPORT.RECEIVED}) in TimeValue(07,00,00) to TimeValue(18,59,59)

@NIGHT_SHIFT = TimeValue({ENTER_TRANSPORT.RECEIVED}) IN TimeValue(19,00,00) TO TimeValue(23,59,59)
AND
TimeValue({ENTER_TRANSPORT.RECEIVED}) IN TimeValue(00,00,00) TO TimeValue(06,59,59)

Then do a count of these.
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 22 Jul 2008 at 7:28am
Hi,
 
Can you post sample data please....
 
thanks
Rahul
IP IP Logged
zloggins
Newbie
Newbie


Joined: 21 Jul 2008
Online Status: Offline
Posts: 2
Quote zloggins Replybullet Posted: 22 Jul 2008 at 8:19am
12/30/1899 07:00:00
or
07/01/2008 07:00:00
IP IP Logged
vallance
Newbie
Newbie
Avatar

Joined: 28 Jul 2008
Location: United States
Online Status: Offline
Posts: 12
Quote vallance Replybullet Posted: 28 Jul 2008 at 6:27pm
I would group it by that field. Then specify the groups that you want instead of just having the field automatically grouped in ascending or descending directions.
Then I would make just two group blocks, the one before that time and past that time.
Finally, I'd sum up the totals from each group and put it in each of the footers
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.031 seconds.