Hi, I'm having trouble connecting to my data in my report that I have created using Visual Studio 2012. I followed the walkthrough for "Creating a Simple Tabular Report" which was very simple. I then followed the "How to Display a Reporting Using the HTML5 Report viewer" which is where I'm encountering errors. I have the HTML5 Report Viewer loading properly, but the data never fills in. The Report Viewer throws the error Cannot establish connection with the Report Server. The console in Google Chrome states that there is a 404 error,
Hi Christopher,
Is the service loaded? If you open this page: http://localhost:60178/ReportService1.svc ; does it show the service?
The server URI is also composed by the endpoint 'ajaxAddress'.
The viewer render settings should look:
renderSettings: { definitionUri: '/Report1.igr', serviceEndpointUri: '..../Services/ReportService.svc/ajaxAddress/' }
Can you please check if this is OK?
When I go to that web page I get a 404 error. The file is in the Visual Studio Project folder where the report.igr file is as well, if that helps? How do I load the service?
Hi Christopher, can you tell me where are you deploying? Are you deploying on IIS or on the Visual Studio Web Server? If it's IIS, which version?
thanks!
Simon
I believe I'm deploying on the Visual Studio Web server. I'm new to Visual Studio so I'm not one hundred percent sure, but from my understanding the Visual Studio Web server is the default one.
I have fixed the 404 error, but now I get a resource failed to load error.
OPTIONS localhost:60178/ReportService1.svc/ajaxAddresss/CreateSessionForReport Resource failed to load
Any suggestions as what to do? Thanks for all the help already, you guys have been very kind!!
Chris
- in order to know where are you deploying, you can right click the web project, go to Properties, and select the WEB tab. Under "Server" you will find that configuration.
- please read this post about referencing Reports in a Report Viewer:
According how I think you are referencing the report, I think you have to change the Build Action of the report (Property Window) to Resource.If the path URI to the report is OK, the report viewer will find the report and then render it.
Hope it helps,
It is running on the Local IIS Web server. I've read through the post about referencing reports and it seems like I have to reference the assembly (which is the project?) so my path for the report igr files would be MvcApplication1;component/Report1.igr. That is in XML, would it be the same for HTML? I've tried and to no avail. Also, in their examples for the server side rendering the are using soapAddress instead of ajaxAddress, I also switched it over to that and nothing. I'm sorry for all the simple questions.
After reworking the URI path and making sure the IIS server was setup correctly I got rid of the 404.3 error. Now I'm stuck on a 500 error, System.ServiceModel.ServiceActivationException
EDIT: Corrected the 500 Error, but now encountering
Error in DataContext =DataSources.sqlDataSource1
Christopher, I think your service path is still wrong. The '/' at the begin isn't correct. Try first find the URI path where the service is using a browser. Then, when you know the absolute path, make it relative to the HTML page path.
I corrected the URI in the view where the Javascript builds the reportViewer, was that the proper location?
Example of the code: // var serviceEndpoint = "/MvcApplication3/ReportService1.svc/ajaxAddress/"; //var serviceEndpoint = "ReportService1.svc/ajaxAddress/"; $.ig.loader({ cssPath: 'Styles', scriptPath: 'Scripts', resources: 'igReportViewer', //locale: 'en-US', ready: function () { $(function () { $("#viewer").igReportViewer({ width: 800, height: 700, renderSettings: { definitionUri: "/MvcApplication3;component/Report1.igr", serviceEndpointUri: serviceEndpoint } }); }); } });
// ]]>
If I try to access the svc file following the path I get 404.3 error. HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. I also followed your web.config if that helps.
Take into acount that when you deploy on IIS, the services URI changes. The URI is different. Did you change it in the HTML report viewer render settings?
I'm trying to deploy to an actually IIS server now, I've followed all your directions and for some reason the version on the server gives the 404 error, but the version when I debug it in Visual Studio displays the report. Any suggestions?