报告定义具有无效的目标命名空间 rsInvalidReportDefinition

The report definition has an invalid target namespace rsInvalidReportDefinition(报告定义具有无效的目标命名空间 rsInvalidReportDefinition)

本文介绍了报告定义具有无效的目标命名空间 rsInvalidReportDefinition的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio 数据工具 2015 创建了一个 ReportProject.当我使用报表向导创建一个 report.rdl 文件时,该 rdl 文件具有 2016 年的架构.我的报表服务器的版本为 12.0.4213.0.

I have created a ReportProject with Visual Studio data tools 2015. When I create a report.rdl file using the report wizard, the rdl file has schema for 2016. My reporting server is of version 12.0.4213.0.

如何创建与我的报告服务器兼容的 report.rdl.我尝试通过右键单击项目 -> 属性并将 targetserverversion 更改为Sql server 2008 R2、2012 或 2014"来更改 TargetServerVersion.但这也不起作用.

How can I create a report.rdl which is compatible with my reporting server. I tried changing the TargetServerVersion by right clicking the project -> properties and changing the targetserverversion to "Sql server 2008 R2, 2012 or 2014". But this doesn't work either.

推荐答案

Edit:您设置为 TargetServerVersion 属性的报告的特定版本在 BIN(debug 或您构建的任何地方)中创建to) 文件夹,只要您不使用任何 2016 功能.

我正在努力寻找相同的答案.您会认为简单地按照您的方式设置解决方案的 TargetServerVersion 会导致它使用正确的报告定义(或者他们可以选择让您选择添加 2016 年之前的报告项)

The specific version of the report you set as the TargetServerVersion property gets created in the BIN (debug or wherever you build to) folder as long as you are not using any 2016 features.

I'm trying to find the same answer. You would think simply setting the solution's TargetServerVersion the way you did would cause it to use the right report definition (or optionally they could give you the option to add a pre-2016 report item)

在那之前,如果您右键单击 .rdl 并查看代码",您可以更改以下几行以使其在 SQL 2014 中工作 - 只需备份原始 .rdl 以防出错:

Until then, if you right click the .rdl and "view code", you can change the following lines to make it work in SQL 2014 - just make a backup of your original .rdl in case you make a mistake:

1) 将报告 xmlns 行替换为以下内容:

1) Replace the report xmlns line with the following:

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

2) 删除 ReportSections 和 ReportSection 行,保留 子树结构主体标记等在其下方).所以删除这些:

2) Remove the ReportSections and ReportSection lines, keeping the child tree structure body tag etc. below it). So remove these:

  <ReportSections>
    <ReportSection>

还有这些……

    </ReportSection>
  </ReportSections>

3) 删除整个 ReportParametersLayout 部分.所以(例如)删除这个:

3) Remove the entire ReportParametersLayout section. So (e.g.) remove this:

  <ReportParametersLayout>
    <GridLayoutDefinition>
      <NumberOfColumns>4</NumberOfColumns>
      <NumberOfRows>2</NumberOfRows>
    </GridLayoutDefinition>
  </ReportParametersLayout>

点击保存,返回设计并运行报告.如果您没有修改设计,它将在 SQL2014 中工作.您更改任何字段的那一刻,它将恢复为 2016 模式.

Hit save, go back into the design and run the report. If you haven't modified the design it will work in SQL2014. The minute you change any fields it will revert to the 2016 schema.

如果有人发现解决此行为的方法,请告诉我们.谢谢!

If anyone sees a way to fix this behavior let us know. Thanks!

这篇关于报告定义具有无效的目标命名空间 rsInvalidReportDefinition的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:报告定义具有无效的目标命名空间 rsInvalidReportDefinition

基础教程推荐