Thursday, February 10, 2011

Why would System.Xml.Serialization.XmlSerializer be undefined in a SSRS 2005 report?

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.

  • So you can close the question out:

    You'll need to add a reference to 'System.Xml' to the project.

    Nathan DeWitt : thanks. it was bugging me...
    From John

0 comments:

Post a Comment