[SalesForce] X-Frame-Options issue

My requirement is to embed a report into a Custom visualforce page. For this I am using apex:iframe with 'src' parameter value set as relative url to the Report. However it does not give any error at compile time but at runtime it only displays a blank page. When I used firebug to inspect it shows
"Refused to display 'https://….' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'."

Does anybody know solution for this problem? Or it will be really helpful if anybody provides alternate way to embed reports into visualforce page.

VisualForce page is:

<apex:page sidebar="false">
    <apex:iframe src="/00OW0000000FngF" scrolling="true"/>
</apex:page> 

Thanks,
KP

Best Answer

SalesForce stopped supporting the displaying of reports in iFrames in Spring '14. They also introduced the Reporting API in this release. Try using the analytics:reportChart tag to display your report. Example:

<analytics:reportChart reportId="00OZ0000000I3rc"/>
Related Topic