This is my query :
SELECT user_info.username, user_info.first_name + ' ' + user_info.last_name AS [user_name],
skordis.FINDHOURS (Sum(DateDiff("s",user_tracking.time_in,user_tracking.time_out))) AS [Time Spent in Phase],
form.form_id, form.name, form.phase_id, phase.name,
FROM ((form
INNER JOIN user_tracking
ON form.form_id = user_tracking.form_id)
INNER JOIN user_info
ON user_tracking.user_id = user_info.user_id)
INNER JOIN phase
ON form.phase_id = phase.phase_id
WHERE (((user_tracking.time_in) Between @date1 And @date2))
GROUP BY user_info.username, user_info.first_name, user_info.last_name, form.form_id, form.name, form.phase_id, phase.name, user_info.active
HAVING (((user_info.active)=1));
I am Using Crystal Reports XI. The query is a stored procedure on an sql server. The function included in the procedure is to return hh:mm:ss.
I tried an alteration of of the query, without the function so it returns only seconds. When I return seconds only I am able to create a subtotal for all the times spent in a specific phase.
When I try to format the seconds into hh:mm:ss within CR, all I get is 00:00:00.