You need to sign in to do that
Don't have an account?
Kshitij
Problem with new VF tag "analytics:reportChart"
For one of my requirement, I have to show two Funnel Charts on page with salesforce reports as source of data. As Funnel Charts can't be done using Google Chart or any other Free JS Library, I had to use the new feature i.e. new VF tag "analytics:reportChart".
The issue I am having is whenever my page loads, my first chart loads and then once the second chart starts loading, the page refreshes completely. This happens most of the time. Is there any solution for this? Please find below my VF page code. I am reRendering my outputpanel with an actionfunction tag.
The issue I am having is whenever my page loads, my first chart loads and then once the second chart starts loading, the page refreshes completely. This happens most of the time. Is there any solution for this? Please find below my VF page code. I am reRendering my outputpanel with an actionfunction tag.
<apex:outputPanel id="reportBlock" layout="block" style="width:100%;">
<div style="float:left;width:48%;">
<div style="width:485px;margin:auto;">
<analytics:reportChart reportId="00OQ0000000Pgol" showRefreshButton="false" cacheResults="true"
filter="{!businessLineFilters}"/>
</div>
</div>
<div style="float:right;width:48%;">
<div style="width:485px;margin:auto;">
<analytics:reportChart reportId="00OQ0000000Pgol" showRefreshButton="false" cacheResults="true"/>
<!--filter="[{column:'BucketField_99085880', operator:'equals', value:'Debit'}]"-->
</div>
</div>
</apex:outputPanel >
<div style="float:left;width:48%;">
<div style="width:485px;margin:auto;">
<analytics:reportChart reportId="00OQ0000000Pgol" showRefreshButton="false" cacheResults="true"
filter="{!businessLineFilters}"/>
</div>
</div>
<div style="float:right;width:48%;">
<div style="width:485px;margin:auto;">
<analytics:reportChart reportId="00OQ0000000Pgol" showRefreshButton="false" cacheResults="true"/>
<!--filter="[{column:'BucketField_99085880', operator:'equals', value:'Debit'}]"-->
</div>
</div>
</apex:outputPanel >
https://success.salesforce.com/issues_view?id=a1p30000000T45IAAS
All Answers
Please don't cache the first chart, try to load both charts at a time.
Try this code
<apex:form>
<apex:actionFunction name="render" rerender="false">
<apex:outputPanel id="reportBlock" layout="block" style="width:100%;">
<div style="float:left;width:48%;">
<div style="width:485px;margin:auto;">
<analytics:reportChart reportId="00OQ0000000Pgol" showRefreshButton="false" cacheResults="false"
filter="{!businessLineFilters}"/>
</div>
</div>
<div style="float:right;width:48%;">
<div style="width:485px;margin:auto;">
<analytics:reportChart reportId="00OQ0000000Pgol" showRefreshButton="false" cacheResults="true"/>
<!--filter="[{column:'BucketField_99085880', operator:'equals', value:'Debit'}]"-->
</div>
</div>
</apex:outputPanel >
</apex:actionFunction>
</apex:form>
Hopefully, this code will work.
Thanks
Vikash_SFDC
I was using the tag "Action:Function" to use rerender function, the logic I was trying to implement is to not allow the page to refresh until both the charts get loaded. Hve you consumed the WSDL or not?, while loading the second chart the page hits the timeout and throws the error.
Thanks
Vikash_SFDC
I am not sure what do you meant by consuming WSDL. I am using this tag on my Visualforce page only with normal apex controller. I tried with putting Action:function at different locations in the page.
Also, one thing I noticed, I am not getting any JavaScript error in Chrome and Firefox. But in Internet Explorer 8 I am getting a JS error saying "Aura has already been initialized".
Thanks,
Kshitij Lawate
We are also facing the same problem where the page refreshes several times while the analytics reports is being loaded. We had couple of reports in the page and it used to sometimes refresh update to 4 times. As long as we have just one chart in the page there is no page refresh. As soon as i enable the second chart it refreshes. Any thoughts to understand if there was a solution to this problem will be useful.
Regards,
Venkatesh S
Unfortunately, this issue is not resolved for us. What information did you give to Salesforce in order to get them to raise it as a known issue?
Andy
This issue seems to be intermittant for me. The earlier day (23 April) it was working perfectly fine and since yesterday it again has started showing the problem. Whenever I open my visualforce page it continues to refresh.
I guess by now salesoforce people might be knowing about this problem and they might be working on it. I will update this post whenever I get any reply from salesforce support.
@Big Ears do you know any workaround for this issue ?
My code below, super simple for POC, need to put more complex filtering:
<apex:page standardController="Account" extensions="AnalyticsController">
<analytics:reportChart reportId="00OG0000006hOxY" size="small" filter="{!chartFilter}" cacheResults="true" />
</apex:page>
public with sharing class AnalyticsController{
private final Account acct;
public AnalyticsController(ApexPages.StandardController stdController) {
this.acct = (Account)stdController.getRecord();
}
public String getChartFilter() {
return JSON.serialize(getSelectedFilters());
}
private List<ColumnFilter> getSelectedFilters() {
List<ColumnFilter> columnFilters = new List<ColumnFilter>();
columnFilters.add(new ColumnFilter('Account.Id','equals', String.valueof(this.acct.Id)));
return columnFilters;
}
public class ColumnFilter {
public ColumnFilter(String col, String oper, String val) {
column = col;
operator = oper;
value = val;
}
// Values needed for apex:analytics component
public String column { get; set; }
public String operator { get; set; }
public String value { get; set; }
}
}
I do not have any update on this. Thanks in advance.
https://success.salesforce.com/issues_view?id=a1p30000000T45IAAS
I've not seen this in our EU0 org, but I'll keep an eye out, in case there's a rolling update going out that hasn't hit our systems yet. What instance are you on?