Again, it works in the file I provided you. Dates are NOT mixed and NOT repeated within vendor and data is summarized in footer sections. You have changed what I provided but I am not sure what you did. Show your code.
If you don't want to show detail records, the Detail Section can be set to Visible No while you do summary calcs in group footers. Otherwise, the RecordSource SQL would be like:
Code:
SELECT Customers.CustomerID, Customers.CustomerName, Customers.CustomerAddress, Customers.CustomerPhone, Products.ProductID, Products.ProductName,
Sum([Quantity]*[PricePerUnit]) AS SumTotal, Sum(Sales.PaidAmount) AS SumPaid,
Format([SaleDate],"yyyymm") AS YearMo, Format([SaleDate],"mmm yyyy") AS MonYear
FROM Products INNER JOIN (
Customers INNER JOIN
Sales ON Customers.CustomerID = Sales.CustomerID) ON Products.ProductID = Sales.ProductID
GROUP BY Customers.CustomerID, Customers.CustomerName, Customers.CustomerAddress, Customers.CustomerPhone, Products.ProductID, Products.ProductName, Format([SaleDate],"yyyymm"), Format([SaleDate],"mmm yyyy");
or
Code:
SELECT Customers.*, Products.ProductID, Products.ProductName, SumQ.*
FROM (Customers
INNER JOIN (
SELECT Sales.CustomerID, Sales.ProductID, Format([SaleDate], "mmm yyyy") AS MonYear, Format([SaleDate],"yyyymm") AS YearMo,
Sum([Quantity]*[PricePerUnit]) AS SumTotal, Sum(Sales.PaidAmount) AS SumPaid
FROM Sales GROUP BY Sales.CustomerID, Sales.ProductID, Format([SaleDate],"yyyymm"), Format([SaleDate], "mmm yyyy")) AS SumQ
ON Customers.CustomerID = SumQ.CustomerID)
INNER JOIN Products ON SumQ.ProductID = Products.ProductID;
If Unit is always KG, don't need to save this into table. If unit can be different, then it becomes meaningless when data is aggregated.