function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sushma  RamakrishnanSushma Ramakrishnan 

This content cannot be displayed in a frame.To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.

Hi All,

I am getting the below error message on click of a Report in my VF Page :
Error message
The below is the part of the code from my VF page throwing error :
<apex:panelGrid columns="3" width="100%"  columnClasses="pbTitle, pbButton" id="panelgrid">
         <apex:pageBlock id="Chart">
                    <apex:pageBlockSection id="spendChart" title="Test Spend Data" columns="1" collapsible="true">                
                        <apex:iframe src="/apex/TestSpendDataReportPage?name={!URLENCODE(Account.Name)}" frameborder="False" scrolling="False" height="420"/>                       
                   </apex:pageBlockSection>
         </apex:pageBlock>
</apex:panelGrid>

Thanks for Any & All Help in Advance...!
bob_buzzardbob_buzzard
Are you trying to access a Salesforce report page? If so, you can't do that as they set the X-Frame-Options header to block iframing and the browser will respect that.

You can read more about this header at : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options 
Sushma  RamakrishnanSushma Ramakrishnan
Hi bob_buzzard,

Yes I am trying to display a Salesforce report page.So what is the workaround for this?

Thanks!
bob_buzzardbob_buzzard
There isn't a workaround I'm afraid - if there was then it wouldn't be a very useful browser header.  You'll need to open the report in its own page or use something like the reports API to recreate it (which I wouldn't recommend).
ErikNelke1ErikNelke1
It blocks this on the "Custom" right side panel of the MyDomain login page as well. extremely irritating.
Lakhan MeghaniLakhan Meghani
Hey Sushma,
Yesterday I was facing same error in mu salesforce production and sandbox org. But today morning, it is working fine. I think it is a browser issue.
Thanks