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?
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?