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
  • 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
    Commented Feb 8, 2016 at 8:06

1 Answer 1

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);

    }
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .