Fixes bug 977636 - upsert for reports table

GOALLLLL