Hi Jason thanks for your input, the filtering is not done in mysql but via master/detail links, using code below works on master recordset but not on detail pages as its simply display the total recordset sums.
Select
tblcontacts.ContactFullName As Name,
Count(tblcases.CaseID)As Cases,
Sum(tblcases.CaseCommission) As Commission
From
tblcontacts Inner Join
tblcases On tblcontacts.ContactID =
tblcases.ContactAssignedTo
Group By
tblcontacts.ContactFullName
UNION ALL
Select
'GRAND-TOTAL',
Count(tblcases.CaseID),
Sum(tblcases.CaseCommission)
From
tblcontacts Inner Join
tblcases On tblcontacts.ContactID =
tblcases.ContactAssignedTo
Not sure how I would do this now, I had started to look at php methods but have no real idea if php can even do calcs?