NOJIRA fixed a bug in sqlserver upsert, made report generator more
robust