def records(self):
        """
        Return a list of all records included in the report. If detail rows are not included
        in the report a ValueError is returned instead.

        Returns
        -------
        records: list
        """
        if not self.has_details:
            raise ValueError('Report does not include details so cannot access individual records')

        records = []
        fact_map = self.data["factMap"]

        for group in fact_map.values():
            rows = group["rows"]
            group_records = (self._flatten_record(row["dataCells"]) for row in rows)

            for record in group_records:
                records.append(record)

        return records