Fixed last report query