Greetings,
We have a sharepoint 2010 enterprise portal used to present to the user some pivot tables with Excel Services whose data source is an OLAP cube.
The pivot table filters need to have default values calculated at runtime.
To set these defaults, we use a code like the following inspired by the following MSDN articles
http://msdn.microsoft.com/en-us/library/ee660132.aspx
http://msdn.microsoft.com/en-us/library/ee589069.aspx
var excelParams = null; if (window.attachEvent) { window.attachEvent("onload", ewaOnPageLoad); } else { window.addEventListener("DOMContentLoaded", ewaOnPageLoad, false); } ... function ewaOnPageLoad() { if (typeof (Ewa) != "undefined") { Ewa.EwaControl.add_applicationReady(ewaApplicationReady); } else { // error condition } } function ewaApplicationReady() { ewa = Ewa.EwaControl.getInstances().getItem(0); if (excelParams) { var wb = ewa.getActiveWorkbook(); wb.setParametersAsync(excelParams, null, null); } else { // error condition } }
Most of the time the parameters are set correctly, however rarely it fails to set these parameters because the event "ewaApplicationReady" is never invoked, even if the pivot table renders on the page.
To solve the problem we are forced to reload the page until the parameters are not set correctly.
Are there any workarounds, or the presence of some hotfix for Excel Service?
Thanks