2017-05-05 91 views
1

我在向報表添加參數時遇到問題。每當我嘗試設置參數時,報告都會顯示一個錯誤。如果我不添加任何參數,報告可以正常工作,但由於存儲過程需要一些參數,所以沒有數據。這是有錯誤的代碼的一部分。Visual Studio 2017中的命名空間無效設置報表參數

prms.Add(new ReportParameter("EndDate", endDate.ToShortDateString())); 
prms.Add(new ReportParameter("StartDate", startDate.ToShortDateString())); 
reportviewer.viewer.LocalReport.SetParameters(prms); 

運行時,該項目是我收到的錯誤:

Microsoft.Reporting.DefinitionInvalidException:報告'的定義是無效的。 ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:此報告的定義無效或由此版本的Reporting Services支持。報告定義可能是使用更高版本的Reporting Services創建的,或者包含基於Reporting Services架構的格式不正確或無效的內容。詳細信息:報告定義中有一個無效的目標命名空間'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition',無法升級。

回答

1
+0

謝謝,您的信息。我把這個項目交給了另一個人。我不知道他是否修好它。我會跟他確認。 – Clarence

+0

安裝這些工具並更改web.config後爲我工作。 – MeanGreen

相關問題