You need to sign in to do that
Don't have an account?

Analytics reportchart
I've added the following code to my VF page:
<analytics:reportChart reportId="00Oc0000000aXNS" size="small"></analytics:reportChart>
The report is on cases and displays a pie chart.
The VF page displays details on a single selected account. The chart however pulls in all cases regardless of account. How would I amend the above code so that it only filters on the cases associated with the account being displayed on the page?
<analytics:reportChart reportId="00Oc0000000aXNS" size="small"></analytics:reportChart>
The report is on cases and displays a pie chart.
The VF page displays details on a single selected account. The chart however pulls in all cases regardless of account. How would I amend the above code so that it only filters on the cases associated with the account being displayed on the page?
https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_analytics_reportChart.htm
In your case I think you'd need :
[{column:'ACCOUNT',operator:'equals',value:'<account_id>'}]
where you'd replace account_id with the id of the account in question.
All Answers
https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_analytics_reportChart.htm
In your case I think you'd need :
[{column:'ACCOUNT',operator:'equals',value:'<account_id>'}]
where you'd replace account_id with the id of the account in question.
The url for the page is essentially /AccountOverview?id=<accountid>
How can I capture the id being passed to the page and place that into the chart instead of hard coding the account id?
The page is very straight forward:
<apex:page standardController="Account" extensions="myAccountControllerExtension">
<apex:pageBlock title="Account Details" mode="edit">
{!Account.Name}<br/>
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!cont}" var="con" >
{!con.id}
{!con.Name}
</apex:pageBlockTable>
</apex:pageBlock>
<apex:pageBlock title="Charts" mode="edit">
<apex:pageBlockSection columns="3">
<analytics:reportChart reportId="00Oc0000000aXNS" size="small" cacheResults="false" filter="{column:'Account.Name',operator:'equals',value:'{!Account.Name}'}" ></analytics:reportChart>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
This displays the error on the VF page:
[For the filter 1: Specify a valid filterable column because Account.Name is invalid.]
{column:'Inventory__c.case__r.recordtype', operator:'notEqual', value:''}
it says Specify a valid filterable column its solution is this.
{column:'FK_CASE_RECORDTYPE', operator:'notEqual', value:''} i was using inventory__c as standard controller on page and i get this solution from this post.
https://salesforce.stackexchange.com/questions/139890/embed-report-chart-to-visualforce-filter-issue
what actually happen is Salesforce has its own api names when you use them in filter which you can get by querying reports metadata.