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?
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.
Hi,
-If you want just to render a report as testing porpouses, change the Web Server to Use Visual Studio Development Server. IIS option needs a different Web.config configuration. The Web.config is updated when you add a Reporting Service to you web project, but that configuration needs to be changed in order to deploy in IIS.
If you need to deploy in IIS I can send you the changes you have to make to the Web.config file.
- To know the assembly name, right clic Project -> Properties and select Application Tab. You will find the Assembly Name there.
- Check also that the report file Build Action is Resource. In other case, the viewer will not find it.
- HTML Report Viewer access the server through the ajaxAddress endpoint. The soapAddress is used by Silverlight, Winforms or WPF viewers, when rendering server side.
hope it helps,
Simon
It works perfectly!!! Thank you so much!!! Learning all the settings available in Visual Studio 2012 is tough (just started programming in it, I'm a senior in college), I cannot thank you enough!
Nice it has finally worked!
You are wellcome :)
Simon,
What changes would I need to make it work on an IIS server. I'm going to have to deploy to an IIS server in the future and you stated there would be some changes to the web.config file?
Thanks,
Christopher
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?