I am using <analytics:reportChart/> tag inside a visualforce page where the reportId attribute value is dynamically retrieved from associated Controller. The controller also runs the report synchronously after adding a filter value to the report.

Visualforce Page

<apex:page sidebar="false" controller="ReportController">
    <analytics:reportChart reportId="{!ReportId}"></analytics:reportChart>


public class ReportController 
    public string getReportId()
        string reportID = '';
        List<Report> reportList = [select ID, DeveloperName from Report 
                                  where DeveloperName = 'myTestReport'];
        reportId = (string)reportList.get(0).get('Id');

        Reports.ReportDescribeResult myReportResult = Reports.ReportManager.describeReport(reportId);
        Reports.ReportMetadata myReportMetaData = myReportResult.getReportMetadata();

        Reports.ReportFilter myFilters = myReportMetaData.getReportFilters()[0];

        //set the filter value
        Reports.ReportResults results = Reports.ReportManager.runReport(reportId, myReportMetaData);

        return reportID;

I see that the report is running successfully but the chart that is getting displayed is NOT capturing the filtered data from the report. Anyone guide me through the right way to achieve this?

  • Did you find answer for this ?
    – brahma
    Sep 12, 2017 at 12:59
  • @brahmajitammana Nope, I did not.
    – sam_s
    Sep 12, 2017 at 15:27

1 Answer 1


Replace second last line with following and try again

Reports.ReportResults results = Reports.ReportManager.runReport(reportId, myReportMetaData,true);
  • Please add some explanation of why this solution is different and what it fixes.
    – Adrian Larson
    Oct 16, 2017 at 21:12

You must log in to answer this question.

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