Custom reports for purchase and sales invoices do not produce consistent results.
The following definition for a purchase history report:
generates this result, where four columns are visible, and grouping takes place properly—with subtotals—by supplier:
If only the description, transaction type, and grouping variable are changed:
the following report results:
In this case, there are three different customers represented in the four sales invoices. But there is no grouping for them. Nor are there subtotals.