refactored reportview.py and added frappe/model/db_query.py