为什么 System.Xml.Serialization.XmlSerializer 在 SSRS 2005 报告中未定义?
我正在尝试序列化数据结构并通过参数将其传递给另一个报告,这行代码:
Dim s As New System.Xml.Serialization.XmlSerializer(GetType(System.Collections.HashTable))
产生此错误:
An error occurred during local report processing.
The definition of the report '/myReport' is invalid.
There is an error on line 22 of custom code: [BC30002] Type 'System.Xml.Serialization.XmlSerializer' is not defined.
如何解决此问题?我已经能够在其他代码行中使用完全定义的 .NET 类,包括以下内容:
Dim outStream As New System.IO.StringWriter()
以及
Private colorMapping As New System.Collections.Hashtable()
任何想法为什么会失败?这是 SQL Server Reporting Services 2005。
I'm trying to serialize a data structure and pass it to another report via parameter, and this line of code:
Dim s As New System.Xml.Serialization.XmlSerializer(GetType(System.Collections.HashTable))
Produces this error:
An error occurred during local report processing.
The definition of the report '/myReport' is invalid.
There is an error on line 22 of custom code: [BC30002] Type 'System.Xml.Serialization.XmlSerializer' is not defined.
How can I get around this? I have been able to use fully defined .NET classes in other lines of code, including the following:
Dim outStream As New System.IO.StringWriter()
and
Private colorMapping As New System.Collections.Hashtable()
Any ideas why this would fail? This is SQL Server Reporting Services 2005.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,您可以结束这个问题:
您需要将对“System.Xml”的引用添加到项目中。
So you can close the question out:
You'll need to add a reference to 'System.Xml' to the project.