Calculate duration of time in crystal reports

Create one formula field give name “tot_seconds” local stringvar array completetime; local numbervar totalseconds; if({dtAttendance.Time}”N/A”) Then ( completetime:=split({dtAttendance.Time},”:”); totalseconds:= ((3600*cdbl(completetime[1])) + (60*cdbl(completetime[2]))+(cdbl(“00”))); ) {dtAttendance.Time} time is a report field which is display time in report. If…

Read More

Clear HTML File Input

HTML file … … – javascript function function clearFileInput() { var oldInput = document.getElementById(“fileInput”); var newInput = document.createElement(“input”); newInput.type = “file”; newInput.id = oldInput.id; newInput.name = oldInput.name; newInput.className = oldInput.className; newInput.style.cssText = oldInput.style.cssText; // copy any…

Read More

User Dynamic query for search records and use uniqueidentifier

Declare @SearchText nvarchar(max) set @SearchText = ‘sah.CheckInCheckOutDateTime>=”2011-09-28 10:00:00.000”’ Declare @SchoolYearId uniqueidentifier set @SchoolYearId=’25511F7F-8F87-4085-A242-2004F4419D36′ Declare @Str as nvarchar(max) set @Str=’ select s.LastName +”, ” + s.FirstName as ”Name”,CheckInCheckOut,sah.CheckInCheckOutDateTime as ”ClockOut” from StaffAttendenceHistory sah join Staffschoolyear ssy on…

Read More

Attendance Reports CheckIn CheckOut in SQL Server

declare @tb1 table (Id int identity(1,1), Name nvarchar(50), CheckInCheckOut bit, CheckInCheckOutDateTime datetime) insert into @tb1(Name,CheckInCheckOut,CheckInCheckOutDateTime)Values(‘Poter, Harry’,1,’2011-08-30 17:00:15.090′) insert into @tb1(Name,CheckInCheckOut,CheckInCheckOutDateTime)values(‘Poter, Harry’,0,’2011-08-30 17:00:20.140′) insert into @tb1(Name,CheckInCheckOut,CheckInCheckOutDateTime)values(‘Poter, Harry’,1,’2011-08-30 17:00:24.890′) insert into @tb1(Name,CheckInCheckOut,CheckInCheckOutDateTime)values(‘Poter, Harry’,0,’2011-08-30 17:00:29.983′) insert into @tb1(Name,CheckInCheckOut,CheckInCheckOutDateTime)values(‘Poter, Harry’,1,’2011-08-31…

Read More