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
Kay CrawfordKay Crawford 

View full dashboard on home page

Hello -

I need to set up my team to view a full dashboard on their home page, but we are only allowed a snapshot.  Is there coding I can input on a custom component that would make this possible?

Thanks, Kay

Best Answer chosen by Kay Crawford
pconpcon
You could write a Visualforce page that has the dashboard in an iframe (but there are some limitations [1]).  Alternately you could write a Visualforce page that uses your reports / custom code to generate charts [2].  Then make this Visualforce page a home page component [3].  The second would require the most work, but would give you the best looking result.

[1] http://salesforce.stackexchange.com/questions/8806/how-can-i-embed-a-dashboard-in-visualforce
[2] https://developer.salesforce.com/blogs/tech-pubs/2011/09/introducing-visualforce-charting.html
[3] https://help.salesforce.com/HTViewHelpDoc?id=home_page_components_custom_create.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=home_page_components_custom_create.htm&language=en_US)

All Answers

pconpcon
You could write a Visualforce page that has the dashboard in an iframe (but there are some limitations [1]).  Alternately you could write a Visualforce page that uses your reports / custom code to generate charts [2].  Then make this Visualforce page a home page component [3].  The second would require the most work, but would give you the best looking result.

[1] http://salesforce.stackexchange.com/questions/8806/how-can-i-embed-a-dashboard-in-visualforce
[2] https://developer.salesforce.com/blogs/tech-pubs/2011/09/introducing-visualforce-charting.html
[3] https://help.salesforce.com/HTViewHelpDoc?id=home_page_components_custom_create.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=home_page_components_custom_create.htm&language=en_US)
This was selected as the best answer
Kay CrawfordKay Crawford
pcon,
Thank you so much for your help!  I just built my first VisualForce page and it is working.  One last thing and it will be perfect.  All of the reports charts are now showing up on my dashboard (yea!), but they are stacked 6 high instead of either 6 on 1 row or split between 2 rows.

<apex:page >
<analytics:reportChart reportID="00OF000000703NY"></analytics:reportChart>
<analytics:reportChart reportID="00OF0000007030P"></analytics:reportChart>
<analytics:reportChart reportID="00OF0000006ICHw"></analytics:reportChart>
<analytics:reportChart reportID="00OF000000703Ol"></analytics:reportChart>
<analytics:reportChart reportID="00OF000000705T4"></analytics:reportChart>
<analytics:reportChart reportID="00OF0000006I627"></analytics:reportChart>
</apex:page>

Any thoughts on what code I should add/use to view side-by-side and where should it be placed?
pconpcon
You will need to put these in a pageBlockSection in order to make them in multiple columns
 
<apex:page >
    <apex:pageBlock>
        <apex:pageBlockSection columns="2">
            <analytics:reportChart reportId="00OF000000703NY" />
            <analytics:reportChart reportId="00OF000000703NY" />
            <analytics:reportChart reportId="00OF0000006ICHw" />
            <analytics:reportChart reportId="00OF000000703Ol" />
            <analytics:reportChart reportId="00OF000000705T4" />
            <analytics:reportChart reportId="00OF0000006I627" />
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

 
Kay CrawfordKay Crawford
Thank you for your help!!!
Kay CrawfordKay Crawford
Hello pcon -
I'm sorry to bother you again, but I have the dashboard looking the way I want (thank you!!), but one of the report charts is a gauge that had to be set up from the dashboard and not in the report, so this one will not show with the <analytics:reportchart> code.  I've tried apex:gaugeSeries, but I just get an error message.  Any suggestions?
pconpcon
What did you try and and what error message did you get?
Kay CrawfordKay Crawford
I'm very new to writing code, so it's pretty much a foreign language to me.  Please forgive my ignorance.  This is one of the things I've tried.
User-added image

 
pconpcon
This is going to require a bit more work.  You'll have to pull down the data in a Custom Controller [1], then create an apex:chart [2] and put your apex:gaugeSeries [3] into that.  You can pull down the report and using the ReportResult [4] class you can get the data out of your report.  It's not a simple thing, and I've not done it before, but it looks like all the parts are there.

[1] https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm
[2] https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_chart.htm
[3] https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_gaugeSeries.htm
[4] https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_reports_reportresults.htm
Kay CrawfordKay Crawford
Thanks pcon!
I've been trying to get past #1 most of the day and I've discovered I'm not even sure how to start.  I thought I could figure it out, but it is obviously way over my head.   I hate to take up more of your time, so I won't bother you anymore, but I really appreciate all the time and assistance you've given me!  I've learned quite a bit from you.
Thanks again!
Kay
pconpcon
This has been bugging me for a while now, so I decided to take some time tonight and give you a solution.  It's not the prettiest of gauges, but hopefully it'll give you something to go by.

http://blog.deadlypenguin.com/blog/2016/01/25/apexgaugeseries-and-display-report-data/

I've also replied to your other post with this as well.  Since you didn't really seem to get a good response from it.
Sunil Shah 8Sunil Shah 8
Thanks pcon for the solution :)