Sage Report Selecting Single Row Where SUM Aggregate Is Present

Hi All,

I have a report that is produced in Sage that I'm trying to replicate directly in SQL Server, but it is proving very difficult

In short, the report uses "sum(ACTUALS.ActualLabourMinutes)" and it is grouped by OpID, very simple

My issue is that the report somehow selects "ACTUALS.EmployeeName" and displays a single name. The same is true for every ACTUALS field. I've looked at the table and there is nothing unique or special about the row that is selected by Sage

My question is how does Sage display single records against an aggregate function? How does it decide which row it is going to choose? Obviously it is a record with the same OpID, but other than that there is nothing to distinguish the record from any other that Sage may have decided to choose.

It isn't the last, it isn't the first, it isn't where a qty has been entered, it isn't the record with the most time spent on it, I just have no idea how Sage is picking the record. I've clicked everywhere in the report designer to try and discover how the record is being picked

Thanks

Lee