Mar31

Parameterised SQL Reports in SharePoint

 Categories: Deployment, Reporting Services, SharePoint

So, I've developed a parameterised report and surfaced it inside a SharePoint site using the Report Viewer Web Part.
 
Now the user has this 'nice' pane on the side of the report to supply the parameter value....

Supply Parameter Pane.

 
How do I provide parameter values without requiring user intervention? Just follow these easy steps.
 
 
Put the page hosting my web part into edit mode:

Edit Page

 
Next click on the edit button for the Report Viewer Web Part, we see the connect to option, but it's disabled. :o(

Edit Web Part with no available connections.

 
A connectable web part to provide the parameter(s) is needed...
Click on one of the Add a Web Part headers.

Add A Web Part

 
Luckily OOTB there are a bunch of Filter Web Parts which we can use for just this purpose! I chose to use the Query String (URL) Filter. 

Add a Web Part Screen.

 
Now open the tool pane.

Open Tool Pane

 
Configure the filter web part.

Tool Pane Configuration

 
The web part is now configured but not connected.

Configured Web Part

 
Now you need to connect the web parts, note that you can choose to connect the web parts from either end.

Connect from filter end

OR

Connect from report viewer end

 
The connection between the web parts needs to be configured.

Configure the connection

 
Now the screen looks like this:

Parameters have not been supplied

 
Once the courseCode query string parameter is supplied the report will be generated using that parameter value.

Parameters have been supplied.

 
 
I hope this helps some one else out there.
 
Tags:

 

Links to this post

Enterprise Collaboration and Virtual Teams Report (March 7, 2008)

Trackback from Effective Collaboration on 07 Mar 2008 05:07

CKS:EBE Resources

Trackback from thekid.me.uk on 12 Mar 2008 11:58

Comments

Leave a comment