Common functions used for reporting needs. Used by django-report-builder and django-report-scaffold.