function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
golugolu 

report data using analytics api

Hi ,
I am able to get the values of the first column using the code below. How can i get the values of second column? Mine is a tabular report
Set<Id> theIDs = new Set<Id>();
List<String> s = new List<String>();
List <Report> reportList = [SELECT Id from report where id = '00OO0000000uUL3' ];
system.debug('reportList' + reportList);
String reportId = (String)reportList.get(0).get('Id');
system.debug('reportId1');
Reports.reportResults results = Reports.ReportManager.runReport(reportID, true);
Reports.ReportFactWithDetails detailFact =(Reports.ReportFactWithDetails) results.getFactMap().get('T!T');
List<Reports.ReportDetailRow> allRows = detailFact.getRows();
system.debug('allRows' + allRows );
for (Integer r = 0; r < allRows.size(); r++) { 
    theIDs.add((Id) allRows.get(r).getDataCells().get(0).getValue());
}
for (Integer r = 0; r < allRows.size(); r++) { 
    s.add((Id) allRows.get(r).getDataCells().get(0).getValue());
}

system.debug('theIDs' + theIDs);
system.debug('detailFact'+ detailFact);