Print Page | Close Window

Count Between TimeValue Range

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3762
Printed Date: 01 May 2024 at 3:38am


Topic: Count Between TimeValue Range
Posted By: zloggins
Subject: Count Between TimeValue Range
Date 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.



Replies:
Posted By: rahulwalawalkar
Date Posted: 22 Jul 2008 at 7:28am
Hi,
 
Can you post sample data please....
 
thanks
Rahul


Posted By: zloggins
Date Posted: 22 Jul 2008 at 8:19am
12/30/1899 07:00:00
or
07/01/2008 07:00:00


Posted By: vallance
Date 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



Print Page | Close Window