tôi đang sử dụng kiểm soát ReportViewer trong trang aspx của mình. tôi đang truy cập báo cáo từ chế độ xử lý từ xa.Không thể tải tệp hoặc lắp ráp Microsoft.ReportViewer.WebForms.XmlSerializers
đây là mã của tôi:
ReportServerDomain = System.Configuration.ConfigurationSettings.AppSettings["ReportServerDomain"];
ReportServerUserName = System.Configuration.ConfigurationSettings.AppSettings["ReportServerUserName"];
ReportServerPassword = System.Configuration.ConfigurationSettings.AppSettings["ReportServerPassword"];
String ReportFolder = System.Configuration.ConfigurationSettings.AppSettings["ReportFolderName"];
rptUrl = new Uri(Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings["ReportURL"]));
IReportServerCredentials irsc = new CustomReportCredentialsToCreateStatement(ReportServerUserName, ReportServerPassword, ReportServerDomain);
ReportViewer1.ServerReport.ReportServerCredentials = irsc;
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
parameters = new ReportParameter[1];
parameters[0] = new ReportParameter("ClientStatementBatchId", ds.Tables["ClientStatemtntBatch"].Rows[0]["ClientStatementBatchID"].ToString());
ReportViewer1.ServerReport.ReportServerUrl = rptUrl;
ReportViewer1.ServerReport.ReportPath = "/" + ReportFolder + "/Client Statements";
ReportViewer1.ServerReport.SetParameters(parameters); // i am getting error on this line.
ReportViewer1.ServerReport.Refresh();
Lỗi này là:
Không thể tải tập tin hoặc lắp ráp 'Microsoft.ReportViewer.WebForms.XmlSerializers, Version = 9.0.0.0, Văn hóa = trung lập, PublicKeyToken = b03f5f7f11d50a3a 'hoặc một trong số các phụ thuộc của nó. Hệ thống không thể tìm thấy các tập tin được chỉ định.
Bất kỳ ai có thể giúp tôi, cách giải quyết vấn đề này không?
Cảm ơn,
D.Bernardin
hãy kiểm tra câu hỏi này và tất cả các câu trả lời ở đây trong SO: http://stackoverflow.com/questions/ 4396146/why-cant-i-see-microsoft-reportviewer-webforms-version-10-0-0-0-in-add-referenc –