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);
}
-
1What 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.– JarvisCommented Feb 8, 2016 at 8:06
Add a comment
|
1 Answer
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);
}