Fixes bug 977636 - upsert for reports table

GOALLLLL
This is because we have two sets of parameters being passed in - one for the `UPDATE` and the other for the `INSERT`. 
Adding named parameters is probably not terribly difficult in the `map()` functions I created above, but I tried to keep with the spirit of the earlier `INSERT` in not using named parameters. Perhaps that was a mistake? 

If you look at the test output that was modified, you'll see all the `%s` in the parameterized query generated by this code.

This was the most concise way that I came up with that still seemed readable enough.. Maybe at a minimum, I add a comment that explains that further?