ProjectUID Filter Provider for Reporting Services Viewer Web Part

Visual Studio 2010 - Custom Web partA couple of months ago, I was wondering if there was a simple way to show project reports automatically within a project workspace. The problem seems quite simple at first, all you need to do is work out which workspace you are in, then pass that value into the Reporting Services viewer web part as a web part connection. After a bit of experimenting with the out of the box web part filter providers, jQuery and other black magic, I quickly came to the conclusion that this wasn’t going to be an easy ask and so cracked open my old friend, Visual Studio 2010.

A couple of hours later (yes, it really did take me that long), I came up with a web part which I have called the ProjectUID Filter Provider for Reporting Services Viewer Web part. To use it you simply drop it onto a Project workspace, the web part will determine the ProjectUID of project the workspace is linked to and then make that available via a web part connection that the Reporting Services Viewer can consume.

Once installed, the web part is available for use in the custom category of the web part gallery.

Web part in the web part gallery

When added to a workspace, the web part is very minimalistic with the following chrome in edit mode and nothing in the normal rendering mode.

ProjectUID web part chrome

If the workspace you are adding the web part to is not connected to a Project, or is not a Project workspace at all, then an error message will be displayed.

To utilise the filter, add a Reporting Services Viewer web part onto your project workspace. In this example I have added a single Reporting Services Viewer web part and configured it to render the Project Status Report from the Project Demo and Evaluation Pack.

Report Viewer Web Part

Next we need to connect the filter provider web parts together, to do this select the context menu for the Reporting Services Viewer Web part, then choose Connections > Get Report Parameters From > ProjectUID Filter Provider for Reporting…

Connecting the web parts

A dialog box will then be displayed allowing you to wire these together, which will default to the ProjectUID. Click on Finish and the web parts will be connected.

Configure Connection

Once you are happy with the page and stopped editing the Project Status Report will render automatically using the ProjectUID passed in from the Filter Provider for Reporting Services Viewer Web part.

The final connected webpart

Of course, the real value of this web part comes into its own when you have more than one report on the page that you wish to render for the specific project. By creating multiple web part connections you can supply the ProjectUID to other Report Viewer web parts.

Now, as I mentioned above I have been sitting on this web part for a few months, why you may ask? Well, for me the killer use of the web part would be to use it in a Project Workspace template, so you could template the reporting dashboard. Unfortunately though if you were to configure the web part connections and create a template, the connections are lost due to the way SharePoint works Sad smile There are solutions to this, which are quite complex and involve event receivers, which I haven’t had a chance to look at in detail just yet. So please be aware of this limitation if you choose to use the web part.  The reason I decided to release the web part now was to help a Project forum user that was after this very capability.

The web part and associated source code can be downloaded from my Skydrive account by clicking below. As usual, this is provided as is, with no warranties or support and use at your own risk etc etc.

Download from SkyDrive

ProjectUID Filter Provider for Reporting Services Viewer

Of course, if you find the web part useful, or wish to suggest changes, please do not hesitate to contact me.

13 thoughts on “ProjectUID Filter Provider for Reporting Services Viewer Web Part

  1. This is awesome, Alex. Coincidentally I just did an internal PoC of this for one of our engagements about three weeks ago. Great minds!

  2. Very useful Alex! This is almost exactly what I was looking for for several months. Indeed, you’re right about the limitation that connections between web parts are lost when using this web part in a SharePoint template. Nevertheless, still very useful stuff!

  3. Pingback: Adding Filtered Project Dashboards to PDPs (Part 1) | Project Epistemology

  4. Hi Alex, We tried to use this and it worked fine when we connect it in the Site. We then tried to create it as a template and use it. When we publish the project using this template, we again need to go and link this to your webpart. Please Help.

    Thanks in Advance

    • Just to add to above comment. I understand that you were not able to create it as a template. But any Updates on this.

      • Hi

        No updates as yet. The problem is to do with the Reporting Services webpart and needing to use reflection to find the connection point. Its not that it can’t be done, it’s just difficult. I haven’t tried it on the new SQL Server 2012 version of the web part yet. That may be an option.

  5. Pingback: Project Server workspace ProjectUID filter web part « Buzz Blog

  6. Pingback: Project Server workspace ProjectUID filter web part « SharePoint (and Project Server) Shenanigans

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s