<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Joe Alanis</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/joala/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/joala/feed.xml</link>
    <description>My thoughts on SharePoint, Azure, and PowerShell</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:41:35 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>EWA Web Part Error</title>
      <link>https://docs.microsoft.com/archive/blogs/joala/ewa-web-part-error</link>
      <pubDate>Tue, 27 Dec 2016 15:54:38 GMT</pubDate>
      <dc:creator><![CDATA[Joe Alanis [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joala/?p=65</guid>
      <description><![CDATA[As this year comes to a close, I figured why wait until the New Year to do to write my first blog...]]></description>
      <content:encoded><![CDATA[As this year comes to a close, I figured why wait until the New Year to do to write my first blog post. So here goes...

Today I am writing about an issue that I encountered while troubleshooting an Excel Web Access Web Part issue. What appears to be a complex issue, ended up having a simple solution. I have to thank my colleague and fellow Premier Field Engineer, John Scott, for his development expertise to help me figure this one out.

For the setup, SharePoint had a Secure Store account that was accessing data from a SSAS (SQL Server Analysis Services) Cube using the EWA web part. On the page, we had a Content Editor web part that linked to a file with some JavaScript. It displays a <strong>Do Filter</strong> link on the page that passes the parameter "Canada" to the slicer in the Excel Workbook that is presented in the EWA web part.

[code language="javascript" highlight="6" title="DoFilter.cwp"]
&lt;a href=&quot;javascript:&quot; onclick=&quot;DoFilter();&quot;&gt;Do Filter&lt;/a&gt;
&lt;script type='text/javascript'&gt;
function DoFilter() {
	var objCollection = {};
	var ewa = Ewa.EwaControl.getInstances().getItem(0);
	objCollection['Slicer_Customer_Geography'] = ['Canada'];
	ewa.getActiveWorkbook().setParametersAsync(objCollection, SetParamsAsyncCallback, null);
}
function SetParamsAsyncCallback(asyncResult)
{
	if (asyncResult.getDescription() != null) {
	alert(asyncResult.getDescription());
	}
}
&lt;/script&gt;

[/code]

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/DoFilter.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/12/DoFilter.png" alt="dofilter" width="1006" height="550" class="alignnone size-full wp-image-95" /></a>

The problem surfaced when clicking on the <strong>Do Filter </strong> link, which resulted in being greeted with the error message:

<span style="color: #ff0000">We're sorry. Because of how Excel Services Application is configured, we can't complete what you asked us to do.</span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/EWA-Error.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/12/EWA-Error.png" alt="ewa-error" width="482" height="171" class="alignnone size-full wp-image-75" /></a>
<h2>What could this be?</h2>
After validating the configuration of Excel Services in Central Administration, checking that the Secure Store account had the proper permissions to the back-end data source, it didn't look like there was anything wrong.

I then confirmed that the parameters were available in the Excel workbook. If you are following along, you can add it by (1) viewing the <strong>Info</strong> on the workbook, (2) open the <strong>Browser View Options</strong>, if not already present, (3) Add the parameter, (4) select the Slicer, (5) and click <strong>OK</strong>.

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/ExcelWorkbookSettings.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/12/ExcelWorkbookSettings.png" alt="excelworkbooksettings" width="977" height="751" class="alignnone size-full wp-image-115" /></a>

Next, I compared the EWA web part configuration and compared it to an environment that works. I found that the difference was with the <strong>Parameter Modification</strong> checkbox. Could this be it? really?

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/WebPartConfig.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/12/WebPartConfig.png" alt="webpartconfig" width="362" height="684" class="alignnone size-full wp-image-135" /></a>

After enabling it, then saving/publishing the page; clicking the <strong>Do Filter</strong> link now worked!

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/DoFilterWorking.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/12/DoFilterWorking.png" alt="dofilterworking" width="1003" height="525" class="alignnone size-full wp-image-105" /></a>

Thanks for reading!

Joe

Did you find this post helpful? I would like to hear about it.]]></content:encoded>
    </item>
  </channel>
</rss>