namespace ‘http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition‘ which cannot .

最近在学习ReportViewer控件创建.rdlc报表。遇到了“无法创建报表....ReportView.WebForm 15.0.0.0”的错误。开发环境:vs2019,报表版本:15.0.0.0。需要删除掉15.0.0.0,在nuget中安装reportviewer12.0版本。.aspx的"查看设计器"页面的报错接触。后来在ctrl+F5运行时,又出现了新问题:“

  • An error occurred during local report processing.
    • The definition of the report 'F:\03练习\ReportsWebsite1\ReportsWebsite1\Report2.rdlc' is invalid.
      • The definition of this report is not valid or supported by this version of Reporting Services. The report definition may have been created with a later version of Reporting Services, or contain content that is not well-formed or not valid based on Reporting Services schemas. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' which cannot be upgraded.

这是由于在修改报表文件后,系统自动保存.rdlc文件时,修改了版本相关信息。需要做如下三点修改:

先打开.rdlc文件,操作方法:右键点击.rdlc文件,选择"xml(文本)编辑"。

修改1.将开头的“<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
 ”修改为:“<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

修改2:

删除节点描述的这两行:

  <ReportSections>
    <ReportSection>

和对应的结束节点两行:

    </ReportSection>
  </ReportSections>

修改3:

删除节点: <ReportParametersLayout>

 <ReportParametersLayout>

....(这两行之间的内容也全部删除哈)

 </ReportParametersLayout>

保存,重新执行ctrl+F5试试。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值