I was trying to work with Reporting Services the other day. I have to make a comparison from a legacy application with my own process. Well, I cannot tell many details about it, but I wanted to upload an xml file from RSS to a class. I thought that it would be a good idea after render the file gets its data into a class using serialization. So I ended up doing the following (for this example I am using a silly report):
I create a report with one table from AdventureWorks database, in this case Address.
I saved the report as XML:
After that I created a file using XSD tool. To do that, just go to the command tool of Visual Studio,
here is the command line
That command line is going to create another file named Address.xsd. Then you can use the following command to create a VB or C# file.
XSD address.xsd /classes /language:vb
Attached the file produce by the command above into your project. I created a simple Console Application and I added to the main the following code:
Dim myReport As New Report
Dim objStreamReader As New StreamReader("C:\Development\temp\Address.xml")
Dim x As New XmlSerializer(myReport.GetType)
myReport = x.Deserialize(objStreamReader)
I fix it removing an extra dimension in the Detail_CollectionDetail array. Using Quick Replace, I replaced ()()() for ()().