System.out.println("Report did not download for reason: " + e.getMessage());
e.printStackTrace();
}
} else {
// Download gzipped CSV asynchronously.
Thread reportThread = reportUtils.whenReportReady(new ReportCallback() {
public void onSuccess() {
try {
System.out.print("Downloading report to " + gzCsvPath + "...");
reportUtils.downloadReport(ExportFormat.CSV_DUMP, gzCsvPath);
System.out.println("done.");