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

Using Reports and Dashboards in Visual force page..



I have few questions:


Is it possible to display the reports and dashboards in the visualforce page? If yes, can anybody provide me with some refernce.


Is it possible to mail the Reports and dashboards?  If yes, then who can be the reciepients. Is it only the salesforce users present in the org. or can we provide any email address?


How can we show reports and dashboards in a section of an objects page layout or in the related lists of the object?




You can mail reports and dashboards via the scheduling functionality.  This allows you to set a report or dashboard to run at a particular time and email to one or more salesforce users (assuming you are using enterprise or unlimited edition).


If you want to add standard reports/dashboards to a VF page, I think that an iframe is your best bet. You can set the source of the iframe to the URL of your report/dashboard.


Thanks I will give that a shot and let you know..One more question is, if i was to create an app that uses the scheduling funtionality of reports and dashboard, and use this app in proffessional edition, would it work? Currently i am using a developer edition to develop this app and i am not able to find from where i can schedule the report and dshboard..

I doubt that approach would work. Scheduling dashboards and reports is done via the UI so you wouldn't have access to it via a package.

#Awesome!  This just resolved a problem we were having about displaying a dashboard in a VF page to post to a Salesforce site on our intranet.


Used the iframe approach.


Are there any alternatives?  Will we have any way of including SF dashboard components in VF pages in future?




I've not seen anything to suggest that. Might be worth posting up an idea (or voting up if there's an existing one).


Hi Bob,


             Its interesting, to know that standard reports can add to visualforce page. What i need to code to get standard report on visualforce page. please provide some sample code.






It's a hack, but you can include images from a dashboard directly in your VF page...


Open the dashboard in your browser and then use "View Source" or similar. You'll see that the dials etc are images with sources like

 i.e. they are generated on-the-fly. You can then use that as the source for an image tag in your Visualforce page.


Obviously, this isn't using a public API so might be liable to change without notice. 


I've only just discovered this. It seems to work, but I'd be interested to know how well it works for others.

Rajat MahajanRajat Mahajan

Hi Guys,


Using iFrame also for displaying Dashboards keeps the header (sfdc logo and tabs) can these be removed and only the reports be shown ?





I'm not aware of any way to achieve this.  You can't influence the iframe from the VF page as they are from different servers, and you don't have the sidebar on the dashboards page to include some javascript.




I have 5 different reports in salesforce. Can I create a VF page and use 5 iframes with the respective reports, to display 5 different reports in one page. Also, let's say that all those 5 reports are Accounts and one of there related object in salesforce. So, can I add a filter in the Visualforce page for the Account Name. What I am trying to achieve is that I pick Account XYZ from the picklist and all the 5 reports are rendered for that account name and display only that account related information.




Can I create a report type where I can have Primary Object Account and 5 different Secondary Objects.





Bit late to this post, but you can pass parameters on the URL to the iframe that sets filter criteria.


Here's a post from my fellow MVP Abhinav Gupta on the subject:


Following your suggestion, I created a visualforce page embedding the URL of the dashboard. I can view this VF page just fine logging in as a standard SF license but I'm unable to view the page when I'm logged in as partner user license. After digging into the issue a little more, I found the the URL contains the servlet.ChartServer which I suspect is restricted from the partner user license type? Is there a work around for this? Thanks!


Dashboards aren't available to partners as far as I'm aware.  When we've had this kind of requirement we've always ended up creating the "dashboard" from scratch using visualforce.


You can use this to remove sfdc logo and tab.


<apex:page showheader="false" sidebar="false">


Is there any way to remove the customizations available in the report using iframe.  I am using the iframe as an inline Visualforce page.


I only want to display the report with out any customizations. Please let me know.

Michael RamseyMichael Ramsey

you can append isdtp=vw to your dashboard url and it will remove the header and sidebar

Nancy Ngo ^ ParkerNancy Ngo ^ Parker
I created a VF page using iframe to bring in the complete Dashboard into the home page.  When I reference the component in my home page layout, the dashboard appears as should; however, when I click on the chart or metrics component to get to the full report, it does nothing.

I have table-type components also on my dashboard and am able to click on it in order to view the full report just fine, but other chart types such as pie/donut/vertical bar chart; or metrics nothing responds.  Is there something we're missing?
Brian WestbrookBrian Westbrook
Bob_Buzzard.  How would you start to create a report from scratch in a VF page.  I have a report built inside salesforce, but want to expose this information to some non-salesforce users.  Any help or link to an example would be great!!

Daita SubrahmanyamDaita Subrahmanyam
Blank page is displayed when I use Iframe to display report. Please see the code below. 
<apex:page >
<apex:iframe > src="/01Z28000000PjqN" frameborder="0" height="900" width="1280"></apex:iframe>
Is there anything wrong with the above code?

Can we display reports on a VF page using the Salesforce1 REST API? 

Lakhan MeghaniLakhan Meghani
You can use the below visualforce tag to include the reports on to Vf page.
For more information of the above tag visit the link-