Sharepoint 2010 Foundation, SSRS Native Mode, Dynamic Parameters

I have a sharepoint 2010 Foundation server, name: sharepoint
I have an SSRS server (in Native Mode), name: ssrs

On ssrs there is a report (TestReport) which takes a single parameter (string): myparam

On sharepoint, I want to create a site template (there will be ~200 sites based on this template)

In th template, I want to render TestReport inside a ReportViewer webpart (I have already installed the required webpart from the SSRS install on the sharepoint server).

The URL that this site will be located at is like http://sharepoint/DemoSites/01009/ , where "01009" is the bit that will change for the ~200 or so sites (so http://sharepoint/DemoSites/01010/ is another one)

I want the ReportViewer webpart to render the report called TestReport, using  "01009" or "01010" as the parameter for myparam.

This way, I can use a single report, and have it render the appropriate data for the site it is being displayed on.

My current idea is to somehow extract the last part of the URL (and get "01009") and then pass this into the ReportViewer webpart for it to use as the value for the parameter for the report it will be rendering.

Any ideas on how to do this?  I have Visual Studio 2008 as my developer platform, and sharepoint designer 2010 instaled.
Who is Participating?
Rainer JeschorConnect With a Mentor Commented:
if coding is not the problem I would create a new filter web part. This will get the relevant part of the url and pass it as filter value to the report viewer web part.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.