Embedding Salesforce Charts in Visualforce
So many updates get added to Salesforce.com all of the time that I'll quite often find a new feature that passed me by.
The problemI was asked to make some improvements to a set of Reports & Dashboards on a customer ORG. Based on the requirements, I knew that I would have to create Visualforce pages to give me full flexibility over the layout, but I wasn't looking forward to recreating all of the reports.
Today's bonus feature is the Visualforce analytics:reportChart tag that lets you grab the URL or any report that has a chart/graphic in it and then drop that chart into any Visualforce page.
Step 1Build a normal Salesforce.com report and add a graph to it
Grab the ID of the report you just made from the URL
Go to your Visualforce page and add the following code
<apex:page> <analytics:reportChart reportId="URL OF YOUR REPORT"/> </apex:page>