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
Swamy P R NSwamy P R N 

Reports in iframe tag not supporting

Hello everyone,

Earlier we were including reports, dashboards in visualforce page by an iframe tag. Now we are not able to show any reports/dashboards in visualforce pages by using iframe tag.

So is there any idea, what is the reason we are not able to see? What is the approach to show report/dashboard in visualforce page?

i tried with "analyticreport tag" also it is not showing reports in visualforce pages. So will you suggest me, what are the available tags to show reports/dashboards in visualforce pages.

Thanks in advance!!
Best Answer chosen by Swamy P R N
PratikPratik (Salesforce Developers) 
Hi Swamy,
 
You are facing this issue because the Clickjack Protection settings are enabled.
You will need to disable these settings.
Check
Setup->Security Controls->Session Setting

To disable the Clickjack Protection, please raise the case with Salesforce Support as you will not able to disable it.

Screenshot:

User-added image


Thanks,
Pratik

P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.

All Answers

PratikPratik (Salesforce Developers) 
Hi Swamy,
 
You are facing this issue because the Clickjack Protection settings are enabled.
You will need to disable these settings.
Check
Setup->Security Controls->Session Setting

To disable the Clickjack Protection, please raise the case with Salesforce Support as you will not able to disable it.

Screenshot:

User-added image


Thanks,
Pratik

P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
This was selected as the best answer
Swamy P R NSwamy P R N
Hi Pratik,

Thank you so much for your update but which one i have to disable for showing reports in visualforce page.

So what is the functionality for "ClickJack Protection"?
PratikPratik (Salesforce Developers) 
Hi Swamy,

Disable the second one. (non setup Salesforce pages)

ClickJAck PProtection:
https://help.salesforce.com/apex/HTViewHelpDoc?id=siteforce_clickjacking_enable.htm&language=en_US
http://docs.releasenotes.salesforce.com/en-us/winter14/release-notes/rn_186_forcecom_cruc_setup_pages.htm

Thanks,
Pratik
 
Swamy P R NSwamy P R N
Hi Pratik,

rather than disable clickjack functionality, is there any way to display reports in visualforcepages.
Earleri we dispayed using iframe tags..so is there any other tag to display reports in visualforce pages.

Thanks,
Swamy P R N
Swamy P R NSwamy P R N
Hello everyone,

any idea on inclusion of report in visualforce pages...plz suggest me.
Swamy P R NSwamy P R N
Hi Pratik,

I raised a case to the salesforce team. They gave the below link and mentioned you can disable the feature by yourself but i'm not able to see the options. So will you suggest me with your idea about this link.

https://help.salesforce.com/apex/HTViewHelpDoc?id=siteforce_clickjacking_enable.htm&language=en_US
Swamy P R NSwamy P R N
Hi Pratik,

As per my request salesforce disabled that click-jack feature. Now i was trying to include reports in visualforce pages but it is not only showing report. It is showin entire page in visualforce page iframe. see the attached image. So will you suggest me, now what am supposed to do to hide the header and etc..i want to show only report in visualforce page.
User-added image
PratikPratik (Salesforce Developers) 
Hi Swamy,

The article link is for site properties configuarations.

To remove header from iframe:
You need to add ?isdtp=mn  or  ?isdtp=lt after the url as below.

<apex:iframe src="/00O900000067o5D?isdtp=lt" scrolling="true" id="theIframe" />

Or

<apex:iframe src="/00O900000067o5D?isdtp=mn" scrolling="true" id="theIframe" />


Refer:
https://help.salesforce.com/HTViewSolution?id=000176973&language=en_US

Try and let me know.

P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
Swamy P R NSwamy P R N
Hello Pratik,

Thanks alot...its hidden now, but stille am able to see Run Report, Show Details, Customize buttons and etc..buttons. I don't want to show all thsose buttons and drop-down's as well. So how can i remove those buttons and drop-down's.

User-added image
PratikPratik (Salesforce Developers) 
Hi Swamy,

I am not sure wheather it will be possible through the ifrmae. I will suggest you to go for css to hide the buttons which you don't want.

Thanks,
Pratik

P.S. If the above replies answers you question, please mark it as "Best Answer" so it will help other community members too.
Swamy P R NSwamy P R N
Hi Pratik,

I tried with CSS, Javascript to hide the "Report Generation Status:Complete" but its not hidden and even those are not invoking, might be because of iframe had a seperate src attribute.
These are the lines, i used but didn't hide. Will you check wether these are correct or not?

<style type="text/css">
    .progressIndicator{ display:none !important; }
</style>
<script type="text/javascript">
   var x = document.getElementById("progressIndicator");
   x.style.display= "none";
</script>
 
Pramod Kumar 41Pramod Kumar 41
Thanks  Swamy P R N & ​Pratik

Hello Sir 
@ Swamy P R N

I was stuck at the same issue ,So i found this artical from google ,it is very hepfull to understand how can we use report and dashboard in visualforce page.






 
PratikPratik (Salesforce Developers) 
Great Pramod! 
@Swamy: you can mark the answer which helped you as Best answer so it will help other community member too.

Thanks,
Pratik