Using Feed Parameters in the RSS Viewer Web Part

Applies To: SharePoint 2010, RSS Viewer Web Part

The RSS Viewer web part is an Out of the Box SharePoint web part that can really add to your site by allowing you to integrate dynamic content directly on your pages from other sites in your environment (requires either anonymous or kerberos authentication) or from sites all over the web. You can add it like any other web part (Located under Content Rollup) and get it going quickly by setting the Feed URL property.

There are feeds all over the web and getting the URL for these is generally straight forward (click the RSS icon/button and then copy the URL) and I’ll let you figure that part out. If you’re simply grabbing a news feed from Yahoo! or someplace, then you’re probably done. There’s a lot that can be done with the formatting of the feed’s content using XSLT, but that’s out of scope for this particular article.

However, what if you would like something a little bit more dynamic? Some feeds are very customizable using query string parameters to automatically filter what you want. A good example might be pulling the SEC Filings from the Securities and Exchange Commission website. You can get a feed of Google’s Filings using the following URL:

There are several parts to this URL beyond the base of (They begin after the ? mark and are separated by the & and take the format of name=value). The one I’m most interested in is the CIK (Central Index Key). This is what tells the feed to return Google’s filings. (As a bonus, for publicly traded companies you can replace that 10 digit number with their Ticker Symbol: GOOG for Google).

Great! Now you can generate a feed for multiple companies’ SEC filings using multiple RSS Viewer web parts. But what if you only want one web part that can switch which company is being displayed? That’s exactly where Feed Parameters come in.

Configure the Filter

Like many web parts, the RSS Viewer web part allows connections to other parts including the filter web parts. Most any of the Filter parts will work depending on what you’re trying to accomplish. An obvious example would be to use the SharePoint List Filter web part to pull company ticker symbols in from another SharePoint list and use a drop down to select which filings to view. My preference, however, is to use a Query String (URL) Filter part so that I can hook it to multiple parts to create a dynamic page that can be linked as if it were many pages. I’ll show you how to hook that up, but the basic concept is the same for any of the parts – Filter some value and send it to the RSS Viewer.

Add a Query String (URL) Fitler part to your page (Located under Filters):

From the tool pane for the Query String (URL) Filter part the key values can be found in the Filter section. The Filter Name property should match the query string property name in your RSS Feed’s URL. So in this case our Filter Name is CIK. The Query String Parameter Name is the name of your own query string to the page. In this case I’ve set it to Symbol. The Default Value is optional, but is generally a good idea so that if the page is accessed without a query string, the feed still shows something. I’ve set ours to GOOG (Although I could easily have set it to Google’s CIK value since the SEC feed is pretty flexible):

It’s also a good idea to also give your filter web part a better name than the default since this is the name you’ll see when setting up the connection. This is just the Title property in the Appearance section. I’ve set mine to Symbol Filter. Press OK to save your changes.

Setup the Connection

Using the drop down menu for the RSS Viewer Web Part choose Connections > Get Feed URL From > Symbol Filter (If you don’t have a Connections menu, select Edit Web Part and look again):

If everything has been successfully connected the Query String (URL) Filter should look similar to this when editing the page (it isn’t visible normally):

If you add ?Symbol=MSFT to the end of your page’s URL (If your page is http://app/site/SitePages/Home.aspx then the filtered url would be http://app/site/SitePages/Home.aspx?Symbol=MSFT) then the RSS Viewer should now be showing Microsoft’s latest SEC Filings. Just kidding! There’s one little gotcha that’s very easy to fix.

If a feed parameter is already set in the RSS Viewer’s URL, then any feed parameters from connected web parts are ignored. In this case, this is because we pasted the feed’s URL in directly including the CIK=0001288776 section of the URL. To fix this, just delete this part of the URL. So our new feed URL will look like:

Now try that filtered URL (Your page + ?Symbol=MSFT) again and you should see Microsoft’s SEC Filings:

This quickly gives us a lot of flexibility. This works great for all sorts of feeds allowing you to filter or customize your feeds before they ever get to you; and all on the fly.


So here’s the summary of what you need to do to get this working:

  • Add an RSS Viewer web part and set the Feed URL to the address of the feed you want to pull. Remove the dynamic parameter you want to set.
  • Add a Filter web part and configure it to pass the filter name as the name of the dynamic filter in the feed URL
  • Connect the RSS Viewer web part to the Filter web part using the Feed Parameter connection
  • Shout Abracadabra every time anyone uses a dynamic view of the page

The RSS Viewer part can be a very powerful part of your page allowing dynamic content without any custom code.

PerformancePoint Top 10 Filter in Analytic Grid

Applies To: SharePoint 2010, SQL 2008 R2, PerformancePoint

Ran into a surprising issue with PerformancePoint today when creating a simple Analytic Grid. I had all the measures and dimensions setup correctly and decided it would be best to just show the top 10 rows. Fortunately, the Dashboard Designer has a handy Top 10 filter built in. Unfortunately, it doesn’t work.

When you apply the filter you will get a message like “There are no data rows to display” or “There is no data to display” or even “Drag measures, dimensions, or named sets to Rows and Columns to lay out the report.” This is especially irritating because it works just fine for Analytic Charts.

Some quick research revealed that the problem is with the generation of the MDX (Query) when working with the Analytic Grid and how SQL 2008 R2 handles it. You can request a hotfix for the problem (for SQL 2008 R2), but it apparently doesn’t fully fix the problem.

So, you’re pretty much stuck with a half fix from Microsoft. This is better than nothing and I would recommend doing it. However, if you’re like me and not in charge of the database management and will have to wait for that team to evaluate and apply the hotfix (if they even will), you might be interested in the workaround I’m using.

My workaround is pretty simple and fixes simple Analytic Grids you would like to start with the Top X type filters, but doesn’t fix the problem when these filters are applied on the fly by the end user using the dashboard. Basically, we take advantage of the fact that your grid’s report type can easily be switched in the designer and that Top X filters work fine for Analytic Charts. This solution is inspired by this Question and Answer on TechNet where Dan English delves into the auto generated MDX.

  • Create your report with all the dimensions, formatting, measures, etc. that you want with the exception of the Top X filter.
  • Right-Click on the Grid and select Report Type > Pie Chart
  • Now apply your Top X filter (Right-Click and select Filter > Top 10) – Generally you will select the Top 10 choice in the series section to apply it to one of the column values
  • Switch to the Query tab
  • Click in the text area, Select All (Ctrl-A) and Copy (Ctrl-C)
  • Switch to the Design tab
  • Right-Click and select Report Type > Grid
  • Switch to the Query tab
  • Click in the text area, Select All (Ctrl-A) and Paste (Ctrl-V)
  • Switch back to the Design tab to see it applied correctly

This solution is a little messy but it works until Microsoft releases a Service Pack with a full fix for the issue.

Note about Filters – Since the query has been edited, none of the automatic connection points exist. You will have to manually add parameters (Query Tab) to the report. For instance, I wanted to use a Time Intelligence filter with my top 10 list to show the top 10 for a given time period. With a regular report I would just add the calendar dimension to the Background and then hook up my filter by using the Source value of “Formula”. Now that the Top 10 filter has been applied and I have no automatic parameters, I simply replaced the Where portion of the query that had my background calendar dimension with a parameter (Query Tab). Then in the connection dialog of the dashboard I choose Source value equal to “Member Unique Name”.