问题描述:
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 ,删除多余的部分。 内部内容保留,才可以使用。