query for reports