Using Ananlytics API in Apex with the help of Reports.ReportsManager Object and its methods, I am retrieving data from a report.
when I try to run the report using the following :-
Reports.ReportInstance instance = Reports.ReportManager.runAsyncReport(reportId,reportMd, true); System.debug('Asynchronous instance: ' + instance); //Get the Async report instance results Reports.ReportInstance instance1 = Reports.ReportManager.getReportInstance(instance.getId()); Reports.ReportResults results = instance1.getReportResults();
I am getting the following error while loading on Page :
"Content cannot be displayed. The report results aren't available because the instance has not finished running."