Tax reports that include voided RM Credit Memo's were failing with a duplicate record error. It seems that Microsoft Dynamics GP adds duplicate tax details to the document when it voids it - with a different TRX Source value.
The error thrown was Unknown error number 54 / SQL #515 /ODBC error: 23000