A 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.
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.
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.
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…
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.
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.
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 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.
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.