[SalesForce] Open report chart in visualforce page

Hi i am tring to open reports chart in visualforce page but i am getting error:

this is me visualforce code:

<apex:page showheader="false">
<base target="_blank" />
        <analytics:reportChart reportId="report_id"  size="large" ></analytics:reportChart>
</apex:page>

The report chart is no longer available because the report has been moved to a personal folder. To display it, drag the report to a shared folder.

this only error how to solve this problem…

enter image description here

enter image description here

Best Answer

Whenever you want to display a report chart in VisualForce page, the user should have appropriate permission to view the report as well.

Try the following:

  • Take the report_id and go the report page as 'https://mydomain.salesforce.com/[report_id]'

  • Edit the report and click on Save Properties

  • Make sure you save the report into accessible public folder (like Unfiled Reports)

Once you refresh the VF page you should be able to see the report.

Update:

  • The problem is you don't have any charts in the report to display

Add Chart:

  • Click on customize on the report and click on Add Chart
  • Save the report and come back here, you should be able to see the report

Its really weird that the message what it was displaying is mis-leading from what is really happening.

enter image description here

Related Topic