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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a Command

Status
Not open for further replies.

rwn

Technical User
Dec 14, 2002
420
US
I have this Query in Access and having a bit of difficulty adding this to a Commnad in Crystal. Any recommendations are appreciated!

SELECT Job.Customer_PO, Sum(IIf([Source]![Inv_Qty]=0,([Material_Trans]![Quantity]*[Material_Req]![Act_Unit_Cost])*[Material_Req]![Cost_Unit_Conv],([Source]![Inv_Qty]*[Material_Req]![Act_Unit_Cost])*[Material_Req]![Cost_Unit_Conv])) AS POCost
FROM (Job INNER JOIN (Material_Req INNER JOIN Source ON Material_Req.Material_Req = Source.Material_Req) ON Job.Job = Material_Req.Job) INNER JOIN Material_Trans ON Source.Source = Material_Trans.Source
GROUP BY Job.Job, Job.Customer_PO, Material_Trans.Tran_Type, Material_Trans.Material_Trans_Date
HAVING (((Job.Customer_PO)='CUST PO 1234') AND ((Material_Trans.Tran_Type)='Receipt'));
 
Take the semi-colon off of the end and see if that solves your problem.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
What kind of difficulties do you have?


Viewer, scheduler and manager for Crystal reports.
Send your report everywhere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top