Deserialization error when loading report
Deserialization error when loading report
Hi,
I have a strange problem. My report (which uses BusinessObjects as a datasource) works perfectly fine when loading from my test bench.
However, I get this error when I try to the same from our product:
2018:05:03, 18:59: StiReport: Loading report from file 'XXXReport.mrt'...ERROR
2018:05:03, 18:59: StiReport: Method : [GetConvertFromException] : TypeConverter cannot convert from System.String.
====================================================
at System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at Stimulsoft.Base.StiObjectStringConverter.StringToObject(String str, Type type) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\StiObjectStringConverter.cs:line 99
at Stimulsoft.Report.StiReportObjectStringConverter.StringToObject2(String str, Type type) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReportObjectStringConverter.cs:line 278
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 994
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 896
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 896
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 896
at Stimulsoft.Base.Serializing.StiSerializing.Deserialize(Object obj, Stream stream, String application) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 1152
at Stimulsoft.Report.SaveLoad.StiXmlReportSLService.Load(StiReport report, Stream stream) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\SaveLoad\StiXmlReportSLService.cs:line 97
at Stimulsoft.Report.StiReport.Load(StiReportSLService service, Stream stream) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 1541
at Stimulsoft.Report.StiReport.Load(Stream stream) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 1414
at Stimulsoft.Report.StiReport.Load(String path) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 1455
====================================================
Maybe it is related to current locale? (ConvertFrom gets an culture)
I didn't find any locale specific texts in the report.mrt...
I have a strange problem. My report (which uses BusinessObjects as a datasource) works perfectly fine when loading from my test bench.
However, I get this error when I try to the same from our product:
2018:05:03, 18:59: StiReport: Loading report from file 'XXXReport.mrt'...ERROR
2018:05:03, 18:59: StiReport: Method : [GetConvertFromException] : TypeConverter cannot convert from System.String.
====================================================
at System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at Stimulsoft.Base.StiObjectStringConverter.StringToObject(String str, Type type) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\StiObjectStringConverter.cs:line 99
at Stimulsoft.Report.StiReportObjectStringConverter.StringToObject2(String str, Type type) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReportObjectStringConverter.cs:line 278
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 994
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 896
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 896
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 896
at Stimulsoft.Base.Serializing.StiSerializing.Deserialize(Object obj, Stream stream, String application) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Base\Serializing\StiSerializing.cs:line 1152
at Stimulsoft.Report.SaveLoad.StiXmlReportSLService.Load(StiReport report, Stream stream) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\SaveLoad\StiXmlReportSLService.cs:line 97
at Stimulsoft.Report.StiReport.Load(StiReportSLService service, Stream stream) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 1541
at Stimulsoft.Report.StiReport.Load(Stream stream) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 1414
at Stimulsoft.Report.StiReport.Load(String path) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.SaveLoad.cs:line 1455
====================================================
Maybe it is related to current locale? (ConvertFrom gets an culture)
I didn't find any locale specific texts in the report.mrt...
Re: Deserialization error when loading report
This happens also with an "empty" report... does the de-serialization depend on current culture?
Re: Deserialization error when loading report
Hi Jalmaria,
That should not be the case, really as we are using Unicode.
Please feel free to attach the report template file in this topic for analysis.
Thank you,
Edward
That should not be the case, really as we are using Unicode.
Please feel free to attach the report template file in this topic for analysis.
Thank you,
Edward
Re: Deserialization error when loading report
Thanks,
Even the simplest report crashes. File attached.
Works in designer and in my test application, but not with the product itself.
Even the simplest report crashes. File attached.
Works in designer and in my test application, but not with the product itself.
- Attachments
-
- SimpleReport.mrt
- (2.79 KiB) Downloaded 302 times
Re: Deserialization error when loading report
Hello, Jalmaria.
We need to find any difference between your test application and your product.
Is it a desktop application in both case?
Do you use the same version of our assemblies? What version?
Do you use the same version of .Net Framework?
Please, try to put the assembly with your business objects to GAC.
Thank you.
We need to find any difference between your test application and your product.
Is it a desktop application in both case?
Do you use the same version of our assemblies? What version?
Do you use the same version of .Net Framework?
Please, try to put the assembly with your business objects to GAC.
Thank you.
Re: Deserialization error when loading report
Thanks,
Both are desktop applications, use same StimulSoft assemblies (2018.2.2), and same .NET Framework version (4.5.2).
Actually the code (assembly) is the same, just the loading application changes. Real product is a mixed mode app (native and managed), if that makes any difference?
I ended up removing tags from the report file one by one. The problem tag is: StiSerializer\Pages\Page1\Margins (<Margins>1,1,1,1</Margins>).
If I remove that tag, the report gets de-serialized fine, but crashes later (of course).
Both are desktop applications, use same StimulSoft assemblies (2018.2.2), and same .NET Framework version (4.5.2).
Actually the code (assembly) is the same, just the loading application changes. Real product is a mixed mode app (native and managed), if that makes any difference?
I ended up removing tags from the report file one by one. The problem tag is: StiSerializer\Pages\Page1\Margins (<Margins>1,1,1,1</Margins>).
If I remove that tag, the report gets de-serialized fine, but crashes later (of course).
Re: Deserialization error when loading report
Hello, Jalmaria.
It seems that the issue in getting class attributes from an assembly.
We are using next attributes
We had got just a few such issues. The solution was to install the assembly to GAC.
Have you installed our assemblies to GAC? Please, try to do it.
Thank you.
It seems that the issue in getting class attributes from an assembly.
We are using next attributes
Code: Select all
[TypeConverter(typeof(Stimulsoft.Report.Components.Design.StiMarginsTypeConverter))]
Have you installed our assemblies to GAC? Please, try to do it.
Thank you.
Re: Deserialization error when loading report
Thanks, fixed the problem.
What's the minimum set of assemblies which require GAC installation? Could it be fixed in upcoming versions?
What's the minimum set of assemblies which require GAC installation? Could it be fixed in upcoming versions?
Re: Deserialization error when loading report
Hello.
The minimum set of assemblies depends on features that you use.
Anyway you need Stimulsoft.Base.dll and Stimulsoft.Report.dll assemblies.
We can't reproduce the issue on our side and it appears at a few our clients.
So, at this moment we can't do anything.
Thank you.
The minimum set of assemblies depends on features that you use.
Anyway you need Stimulsoft.Base.dll and Stimulsoft.Report.dll assemblies.
We can't reproduce the issue on our side and it appears at a few our clients.
So, at this moment we can't do anything.
Thank you.