Sorting anomaly on Net Worth detail reports?

Dr_B
Dr_B Member ✭✭
I have been trying to understand how QM reports Net Worth and was looking at the detail report generated by clicking on the value in the Net Worth report. A Net Worth -Details report is generated that indicates it is sorted by Date even though it is not fully sorted.

It appears that the details report contains 'uncleared' transactions that do not appear in the transactions register that the user sees. All of the transactions in the user-visible register are cleared ('R'). The transactions are: realized and unrealized capital gains, Buy: Security added; and Sell: Security removed.

Changing the sort order to descending by date leaves the uncleared transactions unchanged at the top of the window while correctly changing the sort order for the reconciled transactions. The unreconciled transactions are not sorted by date, payee, category or amount.

Does anyone have any idea why this is?

Sorting by Category changes the order of the unreconciled transactions while keeping them at the top of the window. If it was an sql query it would be something like this:
select * from mybrokeraccount
order by CLR, Category

If I sort by date again after sorting by category, the sequence set by the last category sort is retained. The uncleared transactions are always sorted by ascending date regardless of the category sort criteria.

If I sort by amount, the sequence of unreconciled transactions changes and all unreconciled transactions are sorted strictly by amount.

Something a bit wonky with the queries being sent to the database, I suspect, or with the way the results are being displayed in the report window.