AbrahamViljoen
Programmer
Hi,
I need to display the actual cost between 2 dates on a project in a report.
This is what i have.
SELECT
Proj.ProjectUID
,ROUND(Proj.[ProjectBudgetCost],0) AS [Budget]
,ROUND(sum((AssiBD.[AssignmentCost]-AssiBD.[AssignmentActualCost])),0) AS [Remaining Cost]
,ROUND(sum(AssiBD.[AssignmentActualCost]),0) AS [Actual Cost]
,ROUND(sum(AssiBD.[AssignmentCost]),0) AS [Cost]
FROM
dbo.MSP_EpmAssignmentByDay AssiBD
JOIN dbo.MSP_EpmProject_UserView Proj
ON AssiBD.[ProjectUID] = Proj.[ProjectUID]
JOIN dbo.MSP_EpmResource_UserView Reso
ON Proj.[ProjectOwnerResourceUID] = Reso.[ResourceUID]
WHERE
AssiBD.[ProjectUID] = @ProjUID
AND AssiBD.[Timebyday] >= @DateStart
AND AssiBD.[Timebyday] <= @DateEnd
GROUP BY
Proj.ProjectUID
,Proj.[ProjectBudgetCost]
But my totals do not match if I go into MSP and count up the actual cost in the Task Usage view between the 2 dates.
Can any one please help.
I need to display the actual cost between 2 dates on a project in a report.
This is what i have.
SELECT
Proj.ProjectUID
,ROUND(Proj.[ProjectBudgetCost],0) AS [Budget]
,ROUND(sum((AssiBD.[AssignmentCost]-AssiBD.[AssignmentActualCost])),0) AS [Remaining Cost]
,ROUND(sum(AssiBD.[AssignmentActualCost]),0) AS [Actual Cost]
,ROUND(sum(AssiBD.[AssignmentCost]),0) AS [Cost]
FROM
dbo.MSP_EpmAssignmentByDay AssiBD
JOIN dbo.MSP_EpmProject_UserView Proj
ON AssiBD.[ProjectUID] = Proj.[ProjectUID]
JOIN dbo.MSP_EpmResource_UserView Reso
ON Proj.[ProjectOwnerResourceUID] = Reso.[ResourceUID]
WHERE
AssiBD.[ProjectUID] = @ProjUID
AND AssiBD.[Timebyday] >= @DateStart
AND AssiBD.[Timebyday] <= @DateEnd
GROUP BY
Proj.ProjectUID
,Proj.[ProjectBudgetCost]
But my totals do not match if I go into MSP and count up the actual cost in the Task Usage view between the 2 dates.
Can any one please help.