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
saas4usaas4u 

Using Reports and Dashboards in Visual force page..

Hi,

 

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?

 

Thanks.

bob_buzzardbob_buzzard

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.

saas4usaas4u

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..

bob_buzzardbob_buzzard
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.
TweetsMcGTweetsMcG

#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?

 

R:)

bob_buzzardbob_buzzard

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

sreenathsreenath

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.

 

 

Thanks

Sreenath

AidanAidan

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

 

https://eu1.salesforce.com/servlet/servlet.ChartServer?rsid=0FLD0000000yb8m&ruid=005D0000001a2u2&did=01ZD0000000pOfR&s=8&fs=12&tfg=14&tfs=-16777216&explode=0&c=gauge&cs=0&title=&eh=no&compo=no&fg=-16777216&bg1=-1&bg2=-1&bgdir=2&dl1=Close+Month&dl2=Opportunity+Owner+Alias&l=2&sax=yes&Yman=no&nc=0&actUrl=%2F00OD0000004aOmB&sd=1&scv=no&sct=no&spt=yes&cu=GBP&ab=X&u=0&vt=0&ab2=Y&u2=0&vt2=3&vl0=Sum+of+Amount&spoc=no&topn=no&gm=0.0&gc0=-4041644&gm0=150000.0&gc1=-4013484&gm1=300000.0&gc2=-11222444&gm2=500000.0&refreshts=1323123601000

 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 ?

 

Regards

Rajat.

bob_buzzardbob_buzzard

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.

KB84KB84

Hi,

 

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.

 

OR

 

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

 

Thanks

/KB

bob_buzzardbob_buzzard

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:

 

http://www.tgerm.com/2011/04/passing-params-to-reports-salesforce.html

curMindcurMind

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!

bob_buzzardbob_buzzard

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.

IshpreetIshpreet

You can use this to remove sfdc logo and tab.

 

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

sfdcFanBoysfdcFanBoy

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!!

Thanks,
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>
</apex:page>
Is there anything wrong with the above code?




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




 
Lakhan MeghaniLakhan Meghani
Hii
You can use the below visualforce tag to include the reports on to Vf page.
<analytics:reportChart>
For more information of the above tag visit the link- https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_analytics_reportChart.htm

Thanks