Export a report to Excel or PDF