开发者

cannot render LocalReport vs 2010

开发者 https://www.devze.com 2023-03-01 03:24 出处:网络
I am using vs2010 and getting this error \"The report definition has an invalid target namespace \'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition\' which cannot be upgraded.

I am using vs2010 and getting this error "The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded." when calling

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

any suggestions?

UPDATE

Had an old rdlc file in my project. had to change the web.config to

add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, C开发者_C百科ulture=neutral, PublicKeyToken=B03F5F7F11D50A3A"

from version 9 and the controlSetup.aspx with version 9 to

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


The report classes in VS 2010 rely on the newer reporting definition. It sounds like you have a report created with an earlier version of your tooling. Try opening your report in the designer and see if it prompts you to upgrade it to the latest definition version.

0

精彩评论

暂无评论...
验证码 换一张
取 消