Screenshot of Error in the Report Viewer
This error reads:
The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
The request failed with HTTP status 404: Not Found.
When I was searching for the cause of this error I was confused by the answer that I kept finding everywhere which was to start messing with host headers and the reporting server’s configuration file. I found this to be a bit extreme since I knew that our (at work) SSRS instance is already in use by a report viewer in a desktop application. I am just trying to view the same set of reports in a web application instead.
Well it turns out I made a silly mistake, a gotcha if you will.
Make sure you are using the Web Service URL and not the Report Manager URL from your SSRS instance. Pretty obvious huh, but those URLs look similar at times. The next question is how do I find out what they are named if I don’t know what they are called or I just want to double check? In order to answer this, you need access to the host machine where SSRS lives and you need to open up SQL Server 2008 R2 Reporting Services Configuration Manager.
Report Manager URL
|You do not want to use this for your report viewer!|
Web Service URL
|You want to use this for your report viewer!|
If this didn’t answer your question, then maybe it really does have something to do with the host header and the reporting server’s configuration.
I found my answer here for the record:
If you add the ReportViewer control to your page and when you load the page it doesn’t show up, then make sure you have set the Height and the Width of the control explicitly. By default it is as small as possible which makes it appear to be invisible (which is stupid in my opinion and not very helpful).
Using the control is pretty straight forward as you can see here.