Hello,
I'm trying to create 2 reports that encompass the following:
1. Report 1 -- Daily Worklog report
a) Summary Count of all requests generated/entered by a certain technician in 1 day.
b) Summary Count of total requests that a certain technician either generated or added work log to.
c) Total work log time spent for all workorders generated or touched by a certain technician for that day.
d) Detailed entries that show time spent per request generated or touched.
2. Report 2 -- Weekly Worklog report.
Same criteria as above, only by week.
---
So far I've managed to create the detailed one by the following SQL, but can't seem to do the summary counts. Any help would be appreciated.
SELECT "rctd"."FIRST_NAME" AS "Time Spent Technician", "ct"."TS_STARTTIME" AS "Time Spent Starttime", "wo"."WORKORDERID" AS "Request ID", "rctd"."FIRST_NAME" AS "Time Spent Technician", "wtd"."NAME" AS "Worklog Type", "ct"."TIMESPENT" AS "Time Spent" FROM "WorkOrder" "wo" LEFT JOIN "WorkOrderToCharge" "wotoc" ON "wo"."WORKORDERID"="wotoc"."WORKORDERID" LEFT JOIN "ChargesTable" "ct" ON "wotoc"."CHARGEID"="ct"."CHARGEID" LEFT JOIN "SDUser" "rcti" ON "ct"."TECHNICIANID"="rcti"."USERID" LEFT JOIN "AaaUser" "rctd" ON "rcti"."USERID"="rctd"."USER_ID" LEFT JOIN "WorkLogTypeDefinition" "wtd" ON "ct"."WORKLOGTYPEID"="wtd"."WORKLOGTYPEID" WHERE ( ( ( ( ( ( "rctd"."FIRST_NAME" = N'Technician 1' ) OR ( "rctd"."FIRST_NAME" = N'Technician 2' ) ) OR ( "rctd"."FIRST_NAME" = N'Technician 3' ) ) OR ( "rctd"."FIRST_NAME" = N'Technician 4' ) ) OR ( "rctd"."FIRST_NAME" = N'Technician 5' ) ) AND ( ( ( "ct"."TS_STARTTIME" >= 1586404800000 ) AND ( ( "ct"."TS_STARTTIME" != 0 ) AND ( "ct"."TS_STARTTIME" IS NOT NULL ) ) ) AND ( ( "ct"."TS_STARTTIME" <= 1586491199000 ) AND ( ( ( "ct"."TS_STARTTIME" != 0 ) AND ( "ct"."TS_STARTTIME" IS NOT NULL ) ) AND ( "ct"."TS_STARTTIME" != -1 ) ) ) ) ) AND wo.ISPARENT='1' ORDER BY 1, 3