Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Time Duration Post Reply Post New Topic
Author Message
RRaghunandanan
Newbie
Newbie


Joined: 28 Jul 2012
Online Status: Offline
Posts: 6
Quote RRaghunandanan Replybullet Topic: Time Duration
     Posted: 28 Jul 2012 at 5:56am
Hi,
I am using the Lenel Onguard with SQL server dBase to make the time attendance system for our employees.
I summarise each day's transaction to make their first entry and last exit for each day and get the datediff. to get the time duration. But the problem is with night shift employees, it is showing the time out which happened in the morning of the same day where actual exit is on the next day. so the datediff. returning with wring value. Any solutions are most welcomed!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 29 Jul 2012 at 7:45am
How are the date an time stored in the database?  You'll need to have a combined date/time in order to get the correct DateDiff.
 
-Dell
IP IP Logged
RRaghunandanan
Newbie
Newbie


Joined: 28 Jul 2012
Online Status: Offline
Posts: 6
Quote RRaghunandanan Replybullet Posted: 29 Jul 2012 at 7:54am
hi, thanks for replying. the date and time is combined and the datediff is working fine. the problem is with max exit value for the night shift employees which i summarise and resets the value on eah day. 
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 30 Jul 2012 at 2:54am
Hi
 
I think if you can set your clock to 24hr. insted of 12hr. it will give a correct value for your datediff() funciton.
 
 
Thanks,
Sastry
IP IP Logged
RRaghunandanan
Newbie
Newbie


Joined: 28 Jul 2012
Online Status: Offline
Posts: 6
Quote RRaghunandanan Replybullet Posted: 30 Jul 2012 at 3:13am
Hi, it didn't work either!. Can any one tell me how to reset the summary value using a formula, which it will reset every second time a group change occurs, please.
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 30 Jul 2012 at 3:37am
Hi
 
This is the forumla which will help you to reset the summary values :
 
Whileprintingrecords;
numbervar x:=0      // This is initialization formula, place this formula in your group (check in which section you would like to reset the values)
 
Whileprintingrecords;
numbervar x;
X:=X+{filedvalue}  // This will accumlate the values, place this formula where you have detail information.
 
Whileprintingrecords;
numbervar x;     // place this formula where you want to show the values
may be in your case it would be group footer.
 
Hope this helps..
Thanks,
Sastry
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