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….
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:
Next click on the edit button for the Report Viewer Web Part, we see the connect to option, but it’s disabled. (
A connectable web part to provide the parameter(s) is needed…
Click on one of the Add a Web Part headers.
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.
Now open the tool pane.
Configure the filter web part.
The web part is now configured but not connected.
Now you need to connect the web parts, note that you can choose to connect the web parts from either end.
OR
The connection between the web parts needs to be configured.
Now the screen looks like this:
Once the courseCode query string parameter is supplied the report will be generated using that parameter value.
I hope this helps some one else out there.
