Using the Reports and Dashboards API is there a way to convert report results to CSV?
Reports.ReportResults results = Reports.ReportManager.runReport(reportId, true);
Map<String, Reports.ReportFact> fmap = results.getFactMap(); // how to convert to csv?
I am looking for an output that looks similar to the file that's generated when a report is exported as CSV. What I don't want is to manually parse the Fact Map as differentiating between summary-only and summary-detailed reports could be nasty.