Dear All,
I want to customize the report for RMS HQ. I did all the exercise but i have one problem. When i am take the difference between two time its ok. but when i am make the total for this time it give me the zero. I made this report in .qrp format. I am pasting my code here. please help me to get the accurate hours calculations.
The Code is as below,
//--- Report Summary --- //
Begin ReportSummary
ReportType = reporttypeMisc
ReportTitle = "Daily Attendance"
PageOrientation = pageorientationportrait
OutLineMode = True
Groups = 2
GroupDescription = ""
DisplayLogo = True
LogoFileName = "MyLogo.bmp"
ProcedureCall = ""
TablesQueried = <BEGIN>
FROM TimeClock WITH(NOLOCK) Inner JOIN Cashier WITH(NOLOCK)
ON TimeClock.CashierID = Cashier.ID AND Timeclock.StoreID = Cashier.StoreID
LEFT JOIN Store ON TimeClock.StoreID = Store.ID
<END>
SelCriteria = ""
GroupBy = ""
SortOrder = ""
End ReportSummary
//--- Title Rows ---//
Begin TitleRow
Text = "<Store Name>"
Font = "Arial"
FontBold = True
FontSize = 16
Color = "Blue"
End TitleRow
Begin TitleRow
Text = "<Report Title>"
Font = "Arial"
FontBold = True
FontSize = 12
Color = "Black"
End TitleRow
Begin TitleRow
Text = "Generated On <Report Date>"
Font = "Arial"
FontBold = True
FontSize = 10
Color = "Black"
End TitleRow
//--- Filters ---//
Begin Filter
FieldName = "TimeClock.TimeIn"
FilterOp = reportfilteropGreaterEqual
FilterLoLim = "<LastWeekStart>"
FilterHilim = ""
End Filter
//--- Columns ---//
Begin Column
FieldName = "Store.Name"
DrillDownFieldName = "Store.Name"
DrillDownReportName = ""
Title = "Store"
VBDataType = vbString
Formula = ""
ColHidden = False
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 2085
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "Store.ID"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Store ID"
VBDataType = vbLong
Formula = ""
ColHidden = True
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 870
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "Store.StoreCode"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Store Code"
VBDataType = vbString
Formula = ""
ColHidden = True
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1095
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "Store.Region"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Store Region"
VBDataType = vbString
Formula = ""
ColHidden = True
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1335
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "Store.City"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Store City"
VBDataType = vbString
Formula = ""
ColHidden = True
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1020
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "Store.State"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Store State"
VBDataType = vbString
Formula = ""
ColHidden = True
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1155
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "Cashier.Number"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Employee Number"
VBDataType = vbString
Formula = ""
ColHidden = False
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1600
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "Cashier.Name"
DrillDownFieldName = "Cashier.Name"
DrillDownReportName = ""
Title = "Employee Name"
VBDataType = vbString
Formula = ""
ColHidden = False
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1900
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "TimeClock.TimeIn"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Date"
VBDataType = vbDate
Formula = "convert(varchar, timeclock.timein)"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1875
GroupMethod = groupmethodsum
ColFormat = "dd-mm-yyyy"
ColAlignment = flexAlignRightCenter
End Column
Begin Column
FieldName = "TimeClock.TimeOut"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Time Out"
VBDataType = vbDate
Formula = ""
ColHidden = True
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1875
GroupMethod = groupmethodNone
ColFormat = ""
ColAlignment = flexAlignRightCenter
End Column
Begin Column
FieldName = "LogIn"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Log In"
VBDataType = vbString
Formula = "CONVERT(nvarchar,Timeclock.TimeIn,20)"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = True
ColWidth = 1875
GroupMethod = groupmethodNone
ColFormat = ""
ColAlignment = flexAlignRightCenter
End Column
Begin Column
FieldName = "LogOut"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Log Out"
VBDataType = vbString
Formula = "CASE WHEN (Timeclock.TimeOut >= Timeclock.TimeIn) THEN CONVERT(nvarchar, Timeclock.TimeOut, 20) ELSE 'Not Punch Out' END"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = True
ColWidth = 1875
GroupMethod = groupmethodNone
ColFormat = ""
ColAlignment = flexAlignRightCenter
End Column
Begin Column
FieldName = "Hours"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Hours"
VBDataType = vbDouble
Formula = "convert(nvarchar, timeclock.timeout - timeclock.timein)"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 1410
GroupMethod = groupmethodSum
ColFormat = "h:m:ss"
End Column
Please help me to correct it. my email id is (umar@imtiaz.com.sa)
Thanks
Umar Khitab