VS2017 RDLC 报表定义的使用

本文描述了VS2017中报表定义工具使用rdlc文件时出现的问题:当为报表新增参数变量后,报表定义从2008版本自动升级到2016版本,并导致执行时报错。文章提供了修改rdlc文件版本的方法来解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述:
VS的报表定义工具,不同的VS版本支持使用的不同,且VS2017新增报表文件rdlc使用的版本是旧版本2010,为其新增参数变量后,报表定义
从2008版本自动变成2016,且执行报错(错误原因未知)。VS2010的报表定义还是2008版的。

2008版的报表定义申明:
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" 
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">

2016版的报表定义申明:
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" 
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

2010 与2016 的报表定义相比较,2016多了这些内容:

 <ReportSection>
  <ReportSections>
    </ReportSection>
  </ReportSections>

  <ReportParametersLayout>
    <GridLayoutDefinition>
      <NumberOfColumns>1</NumberOfColumns>
      <NumberOfRows>1</NumberOfRows>
      <CellDefinitions>
        <CellDefinition>
          <ColumnIndex>0</ColumnIndex>
          <RowIndex>0</RowIndex>
          <ParameterName>PlanId</ParameterName>
        </CellDefinition>
      </CellDefinitions>
    </GridLayoutDefinition>
  </ReportParametersLayout>

解决方法:
打开rdlc文件,必须将2016 版本改成2010 ,删除多余的部分。 内部内容保留,才可以使用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值