Reports and dashboards display how you performed in the past and what’s happening at the moment. They are important to driving success and implementation of any CRM project. The information provided by reports and dashboards is especially important in today’s arena, where it’s critical to be proactive, rather than reactive, in your approach. You want to be able to spot trends and act on them immediately.
Business Use case:- Higher management in Universal Container wants to use “Opportunity trends” report chart on a Visualforce Page.
The solution of above business requirement
- Create a Report with Chart. If you don’t to how to do that please go through my article Embedding Charts Anywhere
- Copy the report ID, you can get a report’s ID from the report URL in Salesforce, or request it through the API.
- Now create a Visualforce page and use Visualforce tag <analytics:reportChart> with attribute reportID
<apex:page > <analytics:reportChart reportId="00Ox0000000i8gv" size="small"></analytics:reportChart> </apex:page>
- It will look like below screenshot
Few points to remember
- By default chart’s size is set to Medium. If you to change the size use size attribute and values you can use are Tiny, Small, Medium, Large, Huge.
- The length of time that an embedded chart can cache data is 24 hours.