SELECT dpt.DEPTNAME 'Avdelning',wo.WORKORDERID '�rende nr',rc.DATETIME 'Kostnadspost datum',rctd.FIRST_NAME 'Tekniker',dpt.DEPTNAME 'Avdelning',std.STATUSNAME '�rendestatus',wo.COMPLETEDTIME 'Genomf�rd tid',rc.MM2COMPLETEREQUEST 'Tillbringad tid',rc.AMOUNT 'M�ngd' FROM WorkOrder_Threaded wot INNER JOIN WorkOrder wo ON wot.WORKORDERID=wo.WORKORDERID INNER JOIN RequestCharges rc ON wo.WORKORDERID=rc.WORKORDERID LEFT JOIN RCTechnicianIDs rct ON rc.REQUESTCHARGEID=rct.REQUESTCHARGEID LEFT JOIN SDUser rcti ON rct.TECHNICIANID=rcti.USERID LEFT JOIN AaaUser rctd ON rcti.USERID=rctd.USER_ID LEFT JOIN DepartmentDefinition dpt ON wo.DEPTID=dpt.DEPTID LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID WHERE (((rc.DATETIME >= $P{fromdate}) AND ((rc.DATETIME != 0) AND (rc.DATETIME IS NOT NULL))) AND ((rc.DATETIME <= $P{todate}) AND (((rc.DATETIME != 0) AND (rc.DATETIME IS NOT NULL)) AND (rc.DATETIME != -1)))) AND wot.THD_WOID=wot.WORKORDERID ORDER BY 1