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

Command

Status
Not open for further replies.

rwn

Technical User
Dec 14, 2002
420
US
I'm trying to create a COMMAND in crystal reports, so I can link a field from this COMMAND to another table. I'm thinking I have to use a command since the item to link from one table to another is actually a formula. The formula is: Maximum({Invoice_Detail.Amount}/{Invoice_Header.Orig_Invoice_Amt},Invoice_Header.Document).

So this is the COMMAND that I'm trying to create- but with no success, yet!
-------------------------------------------------------
SELECT `Invoice_Detail`.`Document`, `Invoice_Detail`.`Amount`, `Invoice_Header`.`Open_Invoice_Amt`
FROM `Invoice_Header` `Invoice_Header` INNER JOIN `Invoice_Detail` `Invoice_Detail` ON `Invoice_Header`.`Document`=`Invoice_Detail`.`Document`
WHERE `Invoice_Header`.`Open_Invoice_Amt`>0 AND maximum(`Invoice_Detail`.`Amount`/ `Invoice_Header`.`Open_Invoice_Amt`)
ORDER BY `Invoice_Detail`.`Document`
-----------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top