0
Id reportId = '00O28000004oRjdEAE';
Reports.ReportDescribeResult reportDescription = Reports.ReportManager.describeReport(reportId);
Reports.ReportExtendedMetadata rEm = reportDescription.getReportExtendedMetadata();
Reports.ReportMetadata rm = reportDescription.getReportMetadata();
//List<String> lstDC=  rm.getDetailColumns();
System.debug(rEm.getDetailColumnInfo());    

for(Reports.DetailColumn dc : rEm.getDetailColumnInfo())
{
    System.debug(dc);   

}
  • 1
    What are you trying to say? What's your exact question? Just pasting your code won't help identifying the issue. Please elaborate your question by adding more details. – Jarvis Feb 8 '16 at 8:06
0

rEm.getDetailColumnInfo() returns a map of type Map<String,Reports.DetailColumn> but you are iterating it as a list, thats why the error is coming.

Change your iteration like this :

for(Reports.DetailColumn dc : rEm.getDetailColumnInfo().values())
{
    System.debug(dc);   

}

or

for(String  tempStr : rEm.getDetailColumnInfo().keySet())
    {
      Reports.DetailColumn dc = rEm.getDetailColumnInfo().get(tempStr);

    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.