if (useSynchronous) {
// Get CSV synchronously.
try {
System.out.println("Waiting for report to finish.");
if (reportUtils.waitForReportReady()) {
System.out.println("Retrieving CSV...");
String csvString = reportUtils.getReport(ExportFormat.CSV_DUMP);
// Get CSV as list of string arrays.
List<String[]> csv = CsvUtils.getCsvDataArray(new StringReader(csvString), true);