2011-04-28 108 views
0

我正在使用vs2010並出現此錯誤「報告定義具有無法升級的無效目標命名空間http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' 「。當致電無法呈現LocalReport vs 2010

renderedBytes = localReport.Render(
     reportType, 
     deviceInfo, 
     out mimeType, 
     out encoding, 
     out fileNameExtension, 
     out streams, 
     out warnings); 

有什麼建議嗎?

UPDATE

在我的項目中的舊RDLC文件。不得不在web.config從9版和controlSetup.aspx 9版本改爲

add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"

%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %

回答

0

報告類在VS 2010中依靠新報告定義。這聽起來像你有一個使用早期版本工具創建的報告。嘗試在設計器中打開報告,看它是否會提示您將其升級到最新的定義版本。

+0

在我的項目中有一箇舊的rdlc文件。必須將web.config從版本9更改爲,將版本9的controlSetup.aspx更改爲<% @ Register Assembly =「Microsoft.ReportViewer.WebForms,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = B03F5F7F11D50A3A」 Namespace =「Microsoft.Reporting.WebForms」TagPrefix =「rsweb」%> – marknery 2011-04-28 16:30:19