我正在尝试序列化数据结构并通过参数将其传递给另一个报告,这行代码:
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。
最佳答案
所以你可以结束这个问题:
您需要将对“System.Xml”的引用添加到项目中。
关于.net - 为什么 System.Xml.Serialization.XmlSerializer 在 SSRS 2005 报告中未定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2072531/