I’m attempting to sum up TotalCost in the JobMtl datatable in an SSRS report, All while showing received quantity from the PORel table and DocUnitPrice from PODetail. Everything is showing up properly in row, however there are a few MtlSeq that have multiple POs attached which causes their TotalCost to Duplicate in the final summation.
Is there anyway to prevent these duplicates in the final summation?
Here is the FROM section of my query:
“FROM JobMtl_” + Parameters!TableGuid.Value + " T1
LEFT OUTER JOIN PORel_" + Parameters!TableGuid.Value + " T2
ON T1.Company = T2.Company AND T1.JobNum = T2.JobNum AND T1.MtlSeq = T2.JobSeq AND T1.AssemblySeq = T2.AssemblySeq
LEFT OUTER JOIN PODetail_" + Parameters!TableGuid.Value + " T3
ON T2.Company = T3.Company AND T2.PONum = T3.PONUM AND T2.POLine = T3.POLine"