You need to sign in to do that
Don't have an account?
golu
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
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);