Custom Report in Project 2007

P

Piet Remen

The nicest way I know is through reporting services. Create a custom report
that reads information out from the project server reporting database.
Configure the reporting services viewer and explorer web parts into PWA so
you can view your custom report from within PWA. These web parts are found in
the reporting services folders within the SQL server installation folders.

Use a SQL statement like the following as an example. Please note i have not
tested this as i needed to strip out some custom field specific names but the
example should point you in the right direction atleast. It reports on all
resource utilisation based on the start and end date parameters or the
project guid. Enter null parameter values for no filter. Hope it helps.

--*****************************************
-- V A R I A B L E D E C L A R A T I O N
--*****************************************

DECLARE @vuidProjectID UNIQUEIDENTIFIER
DECLARE @vdtmStartDate DATETIME
DECLARE @vdtmEndDate DATETIME

SET @vuidProjectID = NULL
SET @vdtmStartDate = NULL
SET @vdtmEndDate = NULL

--*****************************************

SELECT
r.ResourceName
,SUM(ISNULL(abd.AssignmentCost,0)) AS AssignmentForecastedCost
,SUM(ISNULL(abd.AssignmentWork,0)) AS AssignmentForecastedWork
,SUM(ISNULL(abd.AssignmentActualCost,0)) AS AssignmentActualCost
,SUM(ISNULL(abd.AssignmentActualWork,0)) AS AssignmentActualWork
,CASE WHEN SUM(ISNULL(abd.AssignmentWork,0)) <> 0 THEN
(SUM(ISNULL(abd.AssignmentActualWork,0))/SUM(ISNULL(abd.AssignmentWork,0))) --Dont multiply by 100 as the report is converting to percentage already
ELSE
0
END AS ResourceUtilisationPercentage
FROM ProjectServer_Reporting.dbo.MSP_EpmProject_UserView p
INNER JOIN ProjectServer_Reporting.dbo.MSP_EpmTask_UserView t
ON p.ProjectUID = t.ProjectUID
INNER JOIN ProjectServer_Reporting.dbo.MSP_EpmAssignment_UserView a
ON p.ProjectUID = a.ProjectUID
AND t.TaskUID = a.TaskUID
INNER JOIN ProjectServer_Reporting.dbo.MSP_EpmResource_UserView r
ON a.ResourceUID = r.ResourceUID
INNER JOIN ProjectServer_Reporting.dbo.MSP_EpmAssignmentByDay_UserView AS abd
ON a.ProjectUID = abd.ProjectUID
AND a.TaskUID = abd.TaskUID
AND a.AssignmentUID = abd.AssignmentUID
WHERE
(abd.TimeByDay >= @vdtmStartDate OR @vdtmStartDate IS NULL)
AND (abd.TimeByDay <= @vdtmEndDate OR @vdtmEndDate IS NULL)
AND (p.ProjectUID = @vuidProjectID OR @vuidProjectID IS NULL)
AND t.TaskIsProjectSummary = 0
AND ISNULL(abd.AssignmentWork,0) <> 0
GROUP BY
r.ResourceName
ORDER BY
r.ResourceName

--*****************************************
-- END OF SQL STATEMENT
--*****************************************


Regards,

Piet Remen
www.projectserver.com.au
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top