【发布时间】:2019-04-26 15:47:15
【问题描述】:
我希望能够扫描 SSRS 报告定义 (.rdl) 文件并以编程方式更改它们。我正在关注 Microsoft 教程(虽然有点过时但找不到最新版本)。
教程在这里:https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2005/aa337455(v%3dsql.90)
我已经从 Microsoft 网站下载了 XML 架构文件 - ReportDefinition.xsd - 现在我按照步骤 4 到 6 打开 Visual Studio 命令提示符并运行实用程序 XSD 以生成 ReportDefinition.vb 文件包含 RDL 模式的类。
但是,当我按照说明运行命令时:
xsd /c /l:VB /n:SampleRDLSchema ReportDefinition.xsd
...我只是收到错误消息:
Error: '.', hexadecimal value 0x00, is an invalid character. Line 2, position 1.
这是文件的前几行;我看不到错误消息所指的字符 0x00:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All rights reserved. -->
<xsd:schema targetNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"
elementFormDefault="qualified">
<xsd:annotation>
<xsd:documentation>
The following schema describes the structure of the
Report Definition Language (RDL) for Microsoft SQL Server 2008 R2.
鉴于这是 Microsoft 编写的使用 Microsoft 实用程序对 Microsoft 提供的文件运行的说明集,我有点困惑为什么其中应该有错误。
有人可以帮忙吗?谢谢。
【问题讨论】:
标签: visual-studio reporting-services xml-parsing