【问题标题】:Error: "missing a mandatory child element"错误:“缺少强制性子元素”
【发布时间】:2015-03-19 03:06:42
【问题描述】:

按照Lesson 5: Publish the Report Definition to the Report Server for SQL Server 2012 的步骤,出现以下错误:

此报告的定义无效或不受此支持 报告服务的版本。报告定义可能是 使用更高版本的 Reporting Services 创建的,或包含内容 根据 Reporting Services 格式不正确或无效 模式。详细信息:报告定义元素“报告”在 第 1878 行,位置 3。它缺少类型的强制子元素 '报告部分'。

当我到达最后一行时:

_reportService.SetItemDefinition(reportPath, bytes, null);

这个问题与我之前在Error < Report xmlns='NonEmpty' > was not expected的问题有关。

我跳过了一步,Lesson 4: Update the Report Definition Programmatically,只是为了确保我没有对成功反序列化的对象进行任何修改。

在第 5 课中,我已成功将未触及的对象序列化回内存流,但未能将其写回报表服务器。请帮忙。

【问题讨论】:

    标签: c# xml serialization reporting-services xml-serialization


    【解决方案1】:

    我通过替换 Lesson 2: Generate Classes from the RDL Schema using the xsd Tool 中的 XSD 解决了这个问题。

    发件人:

    http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition/ReportDefinition.xsd
    

    收件人:

    http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition/ReportDefinition.xsd
    

    【讨论】:

    • 听起来您没有 SQL 2012 作为您的 SSRS 服务器。
    • 事实上,我已经设置了 SQL 2012 SSRS 服务器,并将 RDL 部署到其中。
    猜你喜欢
    • 1970-01-01
    • 2012-01-06
    • 2013-11-26
    • 2011-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多