This is a migrated thread and some comments may be shown as answers.

Report error - There was an error reflecting type 'Telerik.Reporting.Report'

1 Answer 283 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 2
Andy Green asked on 17 Aug 2012, 08:49 AM
I'm in a bit of a muddle here, these reports worked fine, until I upgraded to the latest Reporting controls. Then I had some DLL issues and ended up uninstalling and re installing again.

The reports sit in a folder and are XML files.
These are deserialised for viewing

We are now getting the error - There was an error reflecting type 'Telerik.Reporting.Report'

This is the code that doe the de serialise:
'Create an XML reader object from the updated string
Using xmlReader As System.Xml.XmlReader = System.Xml.XmlReader.Create(New System.IO.StringReader(xmlString))
 
    'Create the report object and assing it the deserialised report definition
    Dim xmlSerializer As New System.Xml.Serialization.XmlSerializer(GetType(Telerik.Reporting.Report))
    Dim report1 As New Telerik.Reporting.Report
    report1 = xmlSerializer.Deserialize(xmlReader)
    report1.Report.ReportParameters(0).Value = imagePath
    report1.Report.ReportParameters(1).Value = Session("User_GUID").ToString
 
    'Assing the report object to the report viewer
    ReportViewer.Report = report1
End Using

I know its not the latest good practice but changing the serialiser to this

Dim xmlSerializer As New Telerik.Reporting.XmlSerialization.ReportXmlSerializer()
Dim report As Telerik.Reporting.Report = DirectCast(xmlSerializer.Deserialize(xmlReader), Telerik.Reporting.Report)

Gives the new error: - An error has occurred during xml serialization. The xml serializer cannot resolve type with name:

Searching the forum doesn't return any results, so guessing this is a new problem.
Andy

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 20 Aug 2012, 04:32 PM
Hello Andy,

With the introduction of the standalone report designer and the new Report Sources, it was necessary that we implement our own serialization/deserialization mechanism, so that we no longer use the serialization mechanism of .NET. The XML serialization/deserialization of report definitions is now achieved through the dedicated ReportXmlSerializer class, for more information refer to the Serializing Report Definition in XML help article.

Please note that the serialization has changed quite a bit, so if the serialization of the reports has been done with an older version, it is possible that it is no longer valid. Please serialize your reports with the new serializer to resolve such problems.

We apologize for the temporary inconvenience.

All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Andy Green
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or