@property
    def rows(self):
        """
            Override this method to create a functional tabular report.
            Returns 2D list of rows.
            [['row1'],[row2']]
        """
        case_id = self.request.GET.get('dot_patient', '')
        start_date_str = self.request.GET.get('startdate',
                                              json_format_date(datetime.utcnow() - timedelta(days=7)))
        end_date_str = self.request.GET.get('enddate', json_format_date(datetime.utcnow()))

        if case_id == '':
            mode = 'all'
        else:
            mode = ''

        start_datetime = datetime.combine(iso_string_to_date(start_date_str),
                                          time())
        end_datetime = datetime.combine(iso_string_to_date(end_date_str),
                                        time())
        for num, obs in enumerate(self.tabular_data(mode, case_id, start_datetime, end_datetime)):
            dict_obj = obs.to_json()
            row = [dict_obj[x.prop_name].encode('utf-8') if isinstance(dict_obj[x.prop_name], unicode) else dict_obj[x.prop_name] for x in self.headers]
            yield row
dataset/ETHPy150Open dimagi/commcare-hq/custom/_legacy/pact/reports/admin_dot_reports.py/PactDOTAdminReport.rows/original