fix report header groups for sql reports
Merge pull request #1054 from dimagi/report_grouping

fix report header groups for sql reports