我正在尝试使用应用程序页面和用户控件在SharePoint 2010中测试报表查看器 我的代码是:
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());
}
但是当我尝试部署此页面时,我收到此错误:
类型' Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages,Microsoft.SharePoint.Portal,Version = 14.0.0.0,Culture = neutral,PublicKeyToken = 71e9bce111e9429c'无法找到
通知:第一次使用sharepoint 2010
答案 0 :(得分:0)
我知道它迟到了,我遇到了和你一样的问题,我遵循了这个article中提到的步骤,你也必须从{{3}安装Microsoft SharePoint的Microsoft SQL Server Reporting Services外接程序如果你有SQL 2014
答案 1 :(得分:0)