Fix report on Rails 4.1

something was messed up with .all. Restructured the query.