Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display the actual cost between 2 dates on a project in a report

Status
Not open for further replies.

AbrahamViljoen

Programmer
Feb 28, 2008
4
ZA
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top