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

Report deserialization error

13 Answers 921 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shameer
Top achievements
Rank 1
Shameer asked on 03 Oct 2013, 01:41 AM
Hello,

The application that I am developing has a set of standard reports which are designed in Visual Studio as .cs classes. Now there is a new requirement that the users should be able to modify these standard reports and upload them back to the application as  a custom report. I use the 'Telerik.Reporting.XmlSerialization.ReportXmlSerializer' class to serialize the report and save it as .trdx file. Users then make the necessary changes to the report using the stand alone designer and then upload it back to the application which will be saved in the database as xml text. When that custom report is run, I deserialize it to a report object. But I get an error during deserialization as follows
<<ERROR START
Telerik.Reporting.Xml.XmlSerializerExcepion was unhandled by user code
  Message=An error has occurred during xml serialization. The xml serializer cannot resolve type with name:
  Source=Telerik.Reporting
  StackTrace:
       at Telerik.Reporting.Xml.ObjectXmlReader.ReadXmlElement(String name)
       at Telerik.Reporting.Xml.ObjectXmlReader.ReadCollection(Object collection)
       at Telerik.Reporting.Xml.ObjectXmlReader.ReadProperties(Object obj)
       at Telerik.Reporting.Xml.ObjectXmlReader.ReadObject(Type type)
       at Telerik.Reporting.Xml.ObjectXmlReader.ReadXmlElement(String name)
       at Telerik.Reporting.Xml.ObjectXmlReader.Deserialize()
       at Telerik.Reporting.XmlSerialization.ReportXmlSerializer.Deserialize(XmlReader reader)      
       at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at System.Windows.Controls.Button.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
  InnerException:
ERROR END>>

The error does not occur when the report is uploaded without making any changes, but that is not of any use to me. The change that I made in the stand alone designer was adding a textbox to the report. I am using the 'Reporting Q2 2013' assemblies. Any help would be highly appreciated.

Thanks in advance
Shameer

13 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 07 Oct 2013, 11:14 AM
Hello Shameer,

Please double-check if the used Standalone Designer tool uses the same Telerik Reporting version as the application where you deserialize the report definition. In addition compare the original trdx file and the modified one beside the added items andlet us know the difference.

If you need further help, please paste a sample XML report definition that causes the same exception at your side.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Consinco S/A
Top achievements
Rank 1
answered on 07 Oct 2013, 08:32 PM
Hello. I'm getting the same error. I checked my Standalone Designer and my Telerik.Reporting versions, and both are the same (7.1.13.802).

Telerik Reporting reference in my Asp.net website, with Visual Studio 2010:

        <add assembly="Telerik.Reporting, Version=7.1.13.802, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>

And I'm getting the same "name" error:
"The xml serializer cannot resolve type with name:"

I had this problem in the past and I solved. But now I'm getting the same error again and I don't remember how to solve. My mistake.
I have a xml string that is the report definition, once made in Telerik Report Designer (standalone) saved in my database. It has the "name" property on the fields, the same way the new one, also made in the standalone, has.
The problem is that the new one gives me the error and the old one works fine.

Does any one know the solution?
Waiting to hearing from you. Thanks for supporting.
0
Shameer
Top achievements
Rank 1
answered on 08 Oct 2013, 05:54 AM

Hello Stef,

I may have found the issue. When I export the report definition as xml, the ReportXmlSerializer writes the whole xml in a single line without any spaces or tabs between tags. If the report is opened in the designer and closed without making any changes, the format of the xml is unchanged and can be deserialized without any errors. But if any changes are made in the designer, the xml is formatted to multiple lines with tabbed indentations and it fails to get deserializeded. To confirm, I took the xml definition that fails, combined the entire xml to one line (using notepad++), removed all the spaces and tabs between tags (used regex) and then it deserialized without any errors. I tried doing the above steps in C# as follows and it works (at least with the limited testing that I have done).

 

string xmlReportDefinition = ReadFromFile();//arbitrary method
            //replace new lines
            xmlReportDefinition = System.Text.RegularExpressions.Regex.Replace(xmlReportDefinition, @"\r\n?|\n", string.Empty);
            //remove white spaces and tabs between tags
            xmlReportDefinition = System.Text.RegularExpressions.Regex.Replace(xmlReportDefinition, @"> *\t*<", "><");

 

Even though this looks like a work around, I would have preferred the deserialization mechanism to handle the issue. BTW, my application and the designer are using the same assembly Telerik.Reporting.dll version 7.1.13.802, public key token a9d7983dfcc261be.

I would highly appreciate it if you could validate this.

Thank you

Shameer

0
Consinco S/A
Top achievements
Rank 1
answered on 08 Oct 2013, 12:06 PM
Perfect work around. Thanks a lot.
0
Stef
Telerik team
answered on 08 Oct 2013, 01:25 PM
Hello Shameer,

The issue is not reproducible at our side.

We have tested to deserialize and display the following XML report definition having it formatted without spaces:
<?xml version="1.0" encoding="utf-8"?><Report Width="6.5in" Name="TempTables" SnapGridSize="0.1in" xmlns="http://schemas.telerik.com/reporting/2012/3.3"><Items><DetailSection Height="0.800000031789144in" Name="detailSection1"><Items><TextBox Width="1.19999996821086in" Height="0.400000095367432in" Left="0.199999968210856in" Top="0.199999968210856in" Value="test" Name="textBox1" /></Items></DetailSection></Items><StyleSheet><StyleRule><Style><Padding Left="2pt" Right="2pt" /></Style><Selectors><TypeSelector Type="TextItemBase" /><TypeSelector Type="HtmlTextBox" /></Selectors></StyleRule></StyleSheet><PageSettings><PageSettings PaperKind="Letter" Landscape="False"><Margins><MarginsU Left="1in" Right="1in" Top="1in" Bottom="1in" /></Margins></PageSettings></PageSettings></Report>

and with spaces:
<?xml version="1.0" encoding="utf-8"?>
<Report Width="6.5in" Name="TempTables" SnapGridSize="0.1in" xmlns="http://schemas.telerik.com/reporting/2012/3.3">
  <Items>
    <DetailSection Height="0.800000031789144in" Name="detailSection1">
      <Items>
        <TextBox Width="1.19999996821086in" Height="0.400000095367432in" Left="0.199999968210856in" Top="0.199999968210856in" Value="test" Name="textBox1" />
      </Items>
    </DetailSection>
  </Items>
  <StyleSheet>
    <StyleRule>
      <Style>
        <Padding Left="2pt" Right="2pt" />
      </Style>
      <Selectors>
        <TypeSelector Type="TextItemBase" />
        <TypeSelector Type="HtmlTextBox" />
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind="Letter" Landscape="False">
      <Margins>
        <MarginsU Left="1in" Right="1in" Top="1in" Bottom="1in" />
      </Margins>
    </PageSettings>
  </PageSettings>
</Report>

In both cases the report was deserialized and displayed correctly. Used Telerik Reporting version - Q2 2013 SP1 7.1.13.802. The report's namespace the also points the report was created with the Standalone Designer accompanying Telerik Reporting Q2 2013 SP1 7.1.13.802.

We will appreciate if you can provide us with an example illustrating the issue, so we can further investigate it.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Consinco S/A
Top achievements
Rank 1
answered on 08 Oct 2013, 01:54 PM

Look at my code below and the attached files.
Thanks.
       
string xml = GetXml();
 
//replace new lines
xml = System.Text.RegularExpressions.Regex.Replace(xml, @"\r\n?|\n", string.Empty);
//remove white spaces and tabs between tags
xml = System.Text.RegularExpressions.Regex.Replace(xml, @"> *\t*<", "><");
 
if (xml != null)
{
    System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings();
    settings.DtdProcessing = DtdProcessing.Parse;
 
    using (XmlReader reader = System.Xml.XmlReader.Create(new System.IO.StringReader(xml), settings))
    {
        Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
 
        var r = xmlSerializer.Deserialize(reader);
        Telerik.Reporting.Report report = (Telerik.Reporting.Report)r;
 
        ReportViewer1.ReportSource = report;
        ReportViewer1.RefreshReport();
    }
}

See that I have the work around suggested by our friend above.
Without these two lines, I got the "name" error:

//replace new lines
xml = System.Text.RegularExpressions.Regex.Replace(xml, @"\r\n?|\n", string.Empty);
//remove white spaces and tabs between tags
xml = System.Text.RegularExpressions.Regex.Replace(xml, @"> *\t*<", "><");

My webconfig:

  <system.web>
    <httpHandlers>
      <add verb="*" path="Telerik.ReportViewer.axd" type = "Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
    </httpHandlers>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="Devart.Data, Version=5.0.424.0, Culture=neutral, PublicKeyToken=09AF7300EEC23701"/>
        <add assembly="Devart.Data.Oracle, Version=6.80.325.0, Culture=neutral, PublicKeyToken=09AF7300EEC23701"/>
        <add assembly="Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
        <add assembly="Telerik.Reporting, Version=7.1.13.802, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
      </assemblies>
    </compilation>
 
...
 
</system.web>
0
Shameer
Top achievements
Rank 1
answered on 09 Oct 2013, 12:37 AM
Hello,

Thank you Consinco and Stef for kind responses.

Stef, I could reproduce the error using the report definitions from your post. The only change I made to them was changing the text in report from 'test' to 'test1' and 'test2' to identify the two reports. If the regex processing of the xml is commented out as shown below, report2 fails to deserialize.

public static string FormatXML(this Telerik.Reporting.Report report, string xmlReportDefinition)
        {
            //replace new lines
            //xmlReportDefinition = System.Text.RegularExpressions.Regex.Replace(xmlReportDefinition, @"\r\n?|\n", string.Empty);
            ////remove white spaces and tabs between tags
            //xmlReportDefinition = System.Text.RegularExpressions.Regex.Replace(xmlReportDefinition, @"> *\t*<", "><");
            return xmlReportDefinition;
        }

Below is the full source code
MainWindow.xaml
<Window x:Class="DeserializationTest.MainWindow"
        Title="MainWindow" Height="453" Width="771" xmlns:tr="http://schemas.telerik.com/wpf">
    <Grid>
        <tr:ReportViewer HorizontalAlignment="Left" Margin="12,12,0,0" Name="reportViewer1" VerticalAlignment="Top" Height="369" Width="725" />
        <Button Content="Upload report" Height="23" HorizontalAlignment="Left" Margin="12,379,0,0" Name="button1" VerticalAlignment="Top" Width="188" Click="button1_Click" />
    </Grid>
</Window>

MainWindow.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.IO;
  
namespace DeserializationTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
  
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            System.Windows.Forms.OpenFileDialog dialog = new System.Windows.Forms.OpenFileDialog();
            dialog.Filter = "TELERIK report definition files (*.trdx)|*.trdx";
            dialog.Multiselect = false;
            dialog.InitialDirectory = @"C:\";
            dialog.Title = "Select file (only in trdx format)";
            if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                using (StreamReader reader = new StreamReader(dialog.FileName))
                {
                    string xml = reader.ReadToEnd();
                    Telerik.Reporting.Report report = new Telerik.Reporting.Report();
                    report = report.CreateFromXML(xml);
                    if (report != null)
                    {
                        Telerik.Reporting.InstanceReportSource source = new Telerik.Reporting.InstanceReportSource();
                        source.ReportDocument = report;
                        reportViewer1.ReportSource = source;
                        reportViewer1.RefreshReport();
                    }
                }
            }
        }
    }
  
    public static class ReportExtensions
    {
        public static Telerik.Reporting.Report CreateFromXML(this Telerik.Reporting.Report report, string xmlReportDefinition)
        {
            xmlReportDefinition = report.FormatXML(xmlReportDefinition);
  
            using (System.IO.StringReader reader = new System.IO.StringReader(xmlReportDefinition))
            {
                using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(reader))
                {
                    Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
                    Telerik.Reporting.Report newReport = xmlSerializer.Deserialize(xmlReader) as Telerik.Reporting.Report;
                    if (report != null)
                    {
                        return newReport;
                    }
                }
            }
  
            return null;
        }
  
        public static void Serialize(this Telerik.Reporting.Report report, string fileName)
        {
            using (System.Xml.XmlWriter xmlWriter = System.Xml.XmlWriter.Create(fileName))
            {
                Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
                xmlSerializer.Serialize(xmlWriter, report);
            }
        }
  
        public static string FormatXML(this Telerik.Reporting.Report report, string xmlReportDefinition)
        {
            //replace new lines
            xmlReportDefinition = System.Text.RegularExpressions.Regex.Replace(xmlReportDefinition, @"\r\n?|\n", string.Empty);
            //remove white spaces and tabs between tags
            xmlReportDefinition = System.Text.RegularExpressions.Regex.Replace(xmlReportDefinition, @"> *\t*<", "><");
            return xmlReportDefinition;
        }
    }
}

app.config
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

report1.trdx
<?xml version="1.0" encoding="utf-8"?><Report Width="6.5in" Name="TempTables" SnapGridSize="0.1in" xmlns="http://schemas.telerik.com/reporting/2012/3.3"><Items><DetailSection Height="0.800000031789144in" Name="detailSection1"><Items><TextBox Width="1.19999996821086in" Height="0.400000095367432in" Left="0.199999968210856in" Top="0.199999968210856in" Value="test1" Name="textBox1" /></Items></DetailSection></Items><StyleSheet><StyleRule><Style><Padding Left="2pt" Right="2pt" /></Style><Selectors><TypeSelector Type="TextItemBase" /><TypeSelector Type="HtmlTextBox" /></Selectors></StyleRule></StyleSheet><PageSettings><PageSettings PaperKind="Letter" Landscape="False"><Margins><MarginsU Left="1in" Right="1in" Top="1in" Bottom="1in" /></Margins></PageSettings></PageSettings></Report>

report2.trdx
<?xml version="1.0" encoding="utf-8"?>
<Report Width="6.5in" Name="TempTables" SnapGridSize="0.1in" xmlns="http://schemas.telerik.com/reporting/2012/3.3">
  <Items>
    <DetailSection Height="0.800000031789144in" Name="detailSection1">
      <Items>
        <TextBox Width="1.19999996821086in" Height="0.400000095367432in" Left="0.199999968210856in" Top="0.199999968210856in" Value="test2" Name="textBox1" />
      </Items>
    </DetailSection>
  </Items>
  <StyleSheet>
    <StyleRule>
      <Style>
        <Padding Left="2pt" Right="2pt" />
      </Style>
      <Selectors>
        <TypeSelector Type="TextItemBase" />
        <TypeSelector Type="HtmlTextBox" />
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind="Letter" Landscape="False">
      <Margins>
        <MarginsU Left="1in" Right="1in" Top="1in" Bottom="1in" />
      </Margins>
    </PageSettings>
  </PageSettings>
</Report>

Regards

Shameer
0
Shameer
Top achievements
Rank 1
answered on 09 Oct 2013, 12:39 AM
Just adding the references from the csproj file to my above post.

<Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System.Xaml">
      <RequiredTargetFramework>4.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="Telerik.Reporting, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
    <Reference Include="Telerik.ReportViewer.Wpf, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
    <Reference Include="Telerik.Windows.Controls, Version=2013.2.724.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files (x86)\Telerik\RadControls for WPF Q2 2013\Binaries\WPF40\Telerik.Windows.Controls.dll</HintPath>
    </Reference>
    <Reference Include="Telerik.Windows.Controls.Input, Version=2013.2.724.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files (x86)\Telerik\RadControls for WPF Q2 2013\Binaries\WPF40\Telerik.Windows.Controls.Input.dll</HintPath>
    </Reference>
    <Reference Include="Telerik.Windows.Controls.Navigation, Version=2013.2.724.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files (x86)\Telerik\RadControls for WPF Q2 2013\Binaries\WPF40\Telerik.Windows.Controls.Navigation.dll</HintPath>
    </Reference>
    <Reference Include="WindowsBase" />
    <Reference Include="PresentationCore" />
    <Reference Include="PresentationFramework" />
0
Accepted
Stef
Telerik team
answered on 11 Oct 2013, 11:16 AM
Hi Shameer,

Thank you for your detailed explanation.

The issue is related to the XmlReader settings, which in our example for deserialization are set as follows:
System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings();
settings.IgnoreWhitespace = true;
 
using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create("Report1.xml", settings))
{
.......
}

You can find attached a WPF project illustrating the result of applying the above lines of code. Generally the settings perform the same as your FormatXML method - removes the spaces in the XML string.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Shameer
Top achievements
Rank 1
answered on 13 Oct 2013, 11:53 PM
Hello Stef,

It was indeed the white space issue. Your suggestion worked perfectly. I appreciate your help. Thank you very much.

Regards

Shameer
0
kavitha
Top achievements
Rank 1
answered on 21 Nov 2013, 11:38 AM

Thanks , i have solved same problem by changing version...
0
Kerem
Top achievements
Rank 1
answered on 09 Apr 2014, 01:24 PM
Hi All,

I have a WPF project which uses Telerik.Report 2012 Q3. But, my standalone designer doesn't accompany with it.

I had already other reports which are done with the accompanied one. So, I duplicated my new report from with one of them.

But, I have encountered an error with the "An error has occurred during xml serialization. The xml serializer cannot resolve type with name: 
  Source=Telerik.Reporting". Mine ended with "...name : Report". After I had tussled for two hours, I opened my new report's ".trdx" file and checked the xmlns part in the second in the .trdx file. The old ones have different version number.

For example;

The line in my old report's file is like below:

<?xml version="1.0" encoding="utf-8"?>
<Report Width="28.6999011385468cm" Name="userReport1" xmlns="http://schemas.telerik.com/reporting/2012/2">

The line in my new report's file is like below:

<?xml version="1.0" encoding="utf-8"?>
<Report Width="28.6999011385468cm" Name="userReport1" xmlns="http://schemas.telerik.com/reporting/2012/3.3">

You can see the difference by looking at the end of the second lines. One ends with '2' , theother ends with '3.3'.

So, I downgraded new file version from '3.3' to '2'. And my code has covered the error.  

Maybe , this can help someone

Regards.

0
Kerem
Top achievements
Rank 1
answered on 09 Apr 2014, 01:25 PM
Hi All,

I have a WPF project which uses Telerik.Report 2012 Q3. But, my standalone designer doesn't accompany with it. 

I had already other reports which are done with the accompanied one. So, I duplicated my new report from with one of them.

But, I have encountered an error with the "An error has occurred during xml serialization. The xml serializer cannot resolve type with name: 
  Source=Telerik.Reporting". Mine ended with "...name : Report". After I had tussled for two hours, I opened my new report's ".trdx" file and checked the 'xmlns' part in the second in the '.trdx' file. The old ones have different version number.
For example;

The line in my old report's file is like below:

<?xml version="1.0" encoding="utf-8"?>
<Report Width="28.6999011385468cm" Name="userReport1" xmlns="http://schemas.telerik.com/reporting/2012/2">

The line in my new report's file is like below:

<?xml version="1.0" encoding="utf-8"?>
<Report Width="28.6999011385468cm" Name="userReport1" xmlns="http://schemas.telerik.com/reporting/2012/3.3">

You can see the difference by looking at the end of the second lines. One ends with '2' , the other ends with '3.3'.

So, I downgraded new file version from '3.3' to '2'. And my code has covered the error.  

Maybe , this can help someone

Regards.
Tags
General Discussions
Asked by
Shameer
Top achievements
Rank 1
Answers by
Stef
Telerik team
Consinco S/A
Top achievements
Rank 1
Shameer
Top achievements
Rank 1
kavitha
Top achievements
Rank 1
Kerem
Top achievements
Rank 1
Share this question
or