2
votes

I am trying to test report viewer in SharePoint 2010 using application page and user control My code is :

 try
        {
            reportvwr.ProcessingMode = ProcessingMode.Remote;
            reportvwr.ServerReport.ReportServerUrl = new Uri("http://localhost/ReportServer");
            reportvwr.ServerReport.ReportPath = "/CustomersByIdReport";
            reportvwr.ServerReport.Refresh();

            ReportParameter[] reportParameterCollection = new ReportParameter[1];       //Array size describes the number of paramaters.
            reportParameterCollection[0] = new ReportParameter();
            reportParameterCollection[0].Name = "customerId";                                 //Give Your Parameter Name
            reportParameterCollection[0].Values.Add(txt_Id.Text);                         //Pass Parametrs's value here.
            reportvwr.ServerReport.SetParameters(reportParameterCollection);
            reportvwr.ServerReport.Refresh();
        }
        catch (Exception ex)
        {
            Response.Write(ex.ToString());
        }

but when i am trying to deploy this page i am getting this error :

The type 'Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' could not be found

notice: First time to work with sharepoint 2010

2
What version and mode of SSRS do you have (for SQL 2008 R2, 2012 or maybe 2014?) and is it installed in SharePoint integrated mode, or in standalone mode?Marek Kembrowski
SQL 2012 on SharePoint integrated modeEslam Soliman

2 Answers

0
votes

I know its to late, I have the same problem as you and I followed the steps mentioned in this article, also you have to install Microsoft SQL Server Reporting Services Add-in for Microsoft SharePoint from here if you have SQL 2014

0
votes

Know its late but I faced this problem recently. Thought of posting it since this might help someone. I faced this error when trying to add reportviewer to my webpart. After some research found that this is related to appSettings section in web.config file.

I have to comment or remove "ReportViewerMessages" in the web.config file and it works for me. My modified appSettings section in web.config looks like this

appSettings of web.config