fixed a where clause in report model