Accumulating Amount

B

Bij12

Hi There,

I have a report that has Group by "status= Funded and Not
funded" , "Department" and "Title"

I need to find the Total amount that department had earned for
different Research Proposals.

I am creating Report using this Query

SELECT Proposal.Title, Agency.AID, Proposal.Type, Role.PersonID,
Role.RoleTypeID, Proposal.SID, Div.IID, Institutions.IName,
Institutions.Regional, Proposal.Amount, Proposal.DateSubmitted
FROM ((Proposal LEFT JOIN Agency ON Proposal.PID = Agency.PID) LEFT JOIN
(Institutions RIGHT JOIN Div ON Institutions.IID = Div.IID) ON Proposal.PID =
Div.PID) LEFT JOIN (Contact RIGHT JOIN Role ON Contact.PersonID =
Role.PersonID) ON Proposal.PID = Role.PID
WHERE (((Role.RoleTypeID)=3 Or (Role.RoleTypeID)=4 Or (Role.RoleTypeID)=6)
AND ((Proposal.SID)=1 Or (Proposal.SID)=2) AND ((Institutions.Regional)=Yes))
OR (((Role.RoleTypeID)=3 Or (Role.RoleTypeID)=4 Or (Role.RoleTypeID)=6) AND
((Proposal.SID)=1 Or (Proposal.SID)=2) AND ((Institutions.IName) Like
"*TEES*" Or (Institutions.IName) Like "*COE*"));

Institutions is a department table.

I have created Group By Department header and footer
At the Footer in the Text feld =sum([Amount]) I don't get correct answer.

My project is due Monday, need help

Thank you
 
K

KARL DEWEY

Try this --
WHERE (Role.RoleTypeID=3 Or Role.RoleTypeID=4 Or Role.RoleTypeID=6
AND Proposal.SID=1 Or Proposal.SID=2) AND (Institutions.Regional=Yes Or
Institutions.IName Like "*TEES*" Or Institutions.IName Like "*COE*");
 

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