I’m currently in a project that requires I use ReportViewer in aspx pages that access an SSRS report server (2005) that is in SharePoint Integration Mode (MOSS 2007). What isn’t obvious is how to set the ReportViewer properties for the ReportPath and ReportServerUrl attributes.
What is most significant is that you can’t use the same settings that you used to deploy the report.
One would think you could take that information from your report project, but it’s unfortunately not that simple. If you do, you may get something similar to this:
Yeah. That’s bad.
I discovered that there are 2 keys to setting up your ServerReport variables when using SharePoint Integration:
- ReportPath needs to have the full URL of the report .rdl file.
- ReportServerUrl is the URL that SharePoint supplies.
For the ReportPath, that should be pretty easy to find. I can’t speak for every installation, but on mine I was able to take the TargetReportFolder URL (see above) and concatenate the report name. For example:
http://rpt.example.com/Reports/yourReport.rdl
For the ReportServerUrl, you’ll need the help of your SharePoint administrator or someone who can run SharePoint Central Administration. It’s easy to find out the URL you need:
Run SharePoint Central Administration. On the left, there should be a bar similar to this:
Select “Application Management” and the screen it gives you will have a section like this:
Under “Reporting Services” select “Manage integration settings”. It’s the first option.
You will then be presented with a screen similar to this:
The parameter you want is in the first text box, “Report Server Web Service URL”
Using the sample data and parameters I’ve given in this example, your line in the markup page (under the ReportViewer tag) would look like this:
<ServerReport ReportPath="http://rpt.example.com/Reports/yourReport.rdl" ReportServerUrl="http://ssrs.example.com:8674/ReportServer" />
This may not work for everyone, but after many hours of struggling, it’s what I was able to get to work.
The main source for my solution is at this link where I took a blended approach from the various solutions offered.
