Include employees and time spent on Project Print Format via Timesheet

I’m trying to create a custom print format in which I would be able to include every employee working on the Project via Timessheet. I would also like to have sum of hours spent on the project.

This is the script I have so far which does the job but i can’t include it on the print format.

SELECT as "Project_Name",
e.employee_name as "Employee_Name",
round(sum(tsd.hours),2) as "Hours",
round(sum(tsd.hours) / 8, 2) as "Days"
FROM `tabProject` p 	
inner join `tabTimesheet Detail` tsd on = tsd.project
inner join `tabTimesheet` ts on tsd.parent =
inner join `tabEmployee` e on ts.employee = e.employee
GROUP BY, e.employee_name
ORDER BY, e.employee_name