Don't check enabled when generating reports.

Also fix invalid SQL syntax (remove where where).