Hi Adam,
The link is inner join.
Here's the SQL query from the Custom Crystal rpt
SELECT "ARDoc"."CustId", "ARDoc"."RefNbr", "ARDoc"."DocType", "Customer"."BillName", "Customer"."BillAddr2", "Customer"."BillAttn", "Customer"."BillCity", "ARTran"."Qty", "ARTran"."CuryTranAmt", "ARDoc"."CuryTaxTot00", "ARDoc"."CuryTaxTot01", "ARDoc"."CuryTaxTot02", "ARDoc"."CuryTaxTot03", "ARDoc"."TaxId00", "ARDoc"."TaxId01", "ARDoc"."TaxId02", "ARDoc"."TaxId03", "ARDoc"."DocDate", "Terms"."Descr", "ARTran"."CuryUnitPrice", "ARDoc"."Rlsed", "ARTran"."TranClass", "ARTran"."DrCr", "ARDoc"."CuryOrigDocAmt", "ARTran"."InvtId", "ARTran"."ProjectID", "ARTran"."UnitPrice", "ARTran"."TranAmt", "Customer"."BillAddr1", "RptCompany"."RI_ID", "Customer"."BillState", "Customer"."BillZip", "ARSetup"."DecPlPrcCst", "ARSetup"."DecPlQty", "ARTran"."TaskID", "ARTran"."TranDesc", "PJPROJ"."project_desc", "ARDoc"."User1", "ARTran"."User1", "ARTran"."CustId"
FROM (((((("EDUAPP"."dbo"."ARPrintQueue" "ARPrintQueue" INNER JOIN "EDUAPP"."dbo"."ARDoc" "ARDoc" ON ("ARPrintQueue"."CpnyID"="ARDoc"."CpnyID") AND ("ARPrintQueue"."INNbr"="ARDoc"."RefNbr")) INNER JOIN "EDUAPP"."dbo"."RptCompany" "RptCompany" ON ("ARPrintQueue"."CpnyID"="RptCompany"."CpnyID") AND ("ARPrintQueue"."RI_ID"="RptCompany"."RI_ID")) LEFT OUTER JOIN "EDUAPP"."dbo"."Customer" "Customer" ON "ARDoc"."CustId"="Customer"."CustId") LEFT OUTER JOIN "EDUAPP"."dbo"."ARTran" "ARTran" ON (("ARDoc"."CustId"="ARTran"."CustId") AND ("ARDoc"."RefNbr"="ARTran"."RefNbr")) AND ("ARDoc"."DocType"="ARTran"."TranType")) LEFT OUTER JOIN "EDUAPP"."dbo"."Terms" "Terms" ON "ARDoc"."Terms"="Terms"."TermsId") INNER JOIN "EDUAPP"."dbo"."PJPROJ" "PJPROJ" ON "ARTran"."ProjectID"="PJPROJ"."project") INNER JOIN "EDUAPP"."dbo"."ARSetup" "ARSetup" ON "Customer"."AcctNbr"<>"ARSetup"."CreditHoldType"
WHERE "ARDoc"."Rlsed"=1 AND ("ARDoc"."DocType"='CM' OR "ARDoc"."DocType"='DM' OR "ARDoc"."DocType"='IN') AND (("ARDoc"."DocType"='DM' OR "ARDoc"."DocType"='IN') AND ("ARTran"."TranClass"<>'D' AND "ARTran"."DrCr"='C' OR "ARTran"."DrCr"='D' AND "ARTran"."TranClass"='D') OR "ARDoc"."DocType"='CM' AND ("ARTran"."DrCr"='D' AND "ARTran"."TranClass"<>'D' OR "ARTran"."DrCr"='C' AND "ARTran"."TranClass"='D'))
ORDER BY "ARDoc"."CustId", "ARDoc"."RefNbr", "ARTran"."ProjectID", "ARTran"."User1"
Any suggestions?
Thanks Much!