You should use [`report.export_format`](https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/reports/generic.py#L303) here - it uses `export_format_override` if it exists, otherwise it uses a fallback.  `export_format_override` defaults to None, so if a report doesn't set it, the export will 404.