TypeConverter cannot convert from System.String

Stimulsoft Reports.NET discussion
Post Reply
User avatar
ProIT
Posts: 28
Joined: Thu Oct 17, 2013 8:10 am
Location: Muttenz

TypeConverter cannot convert from System.String

Post by ProIT »

Hi

Stimulsoft Ultimate 2013.3.1800

I created a plugin for a crm system. On my PC it works like a charm. However when I deploy the solution on a other PC I get the following error when I try to open the report:

Code: Select all

System.NotSupportedException: 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)
   at Stimulsoft.Report.StiReportObjectStringConverter.StringToObject(String str, Type type)
   at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
   at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
   at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
   at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
   at Stimulsoft.Base.Serializing.StiSerializing.Deserialize(Object obj, Stream stream, String application)
   at Stimulsoft.Report.SaveLoad.StiXmlReportSLService.Load(StiReport report, Stream stream)
   at Stimulsoft.Report.StiReport.Load(StiReportSLService service, Stream stream)
   at Stimulsoft.Report.StiReport.Load(Stream stream)
   at Stimulsoft.Report.StiReport.Load(String path)
   at ProIT.AwaFactsheet.Managers.ReportManager.CreateReport(FactSheetType factSheetType, Int32 addressID)
   at ProIT.AwaFactsheet.UserControls.FactSheetUserControl.btnFactsheet_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at DevExpress.XtraEditors.BaseButton.OnClick(EventArgs e)
   at DevExpress.XtraEditors.BaseButton.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)
   at DevExpress.XtraEditors.BaseControl.WndProc(Message& msg)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Even when I create a blank report and switch to the preview pane in the designer I get an error:

Code: Select all

System.NotSupportedException: TypeConverter kann Stimulsoft.Report.Dictionary.StiBusinessObject nicht in System.ComponentModel.Design.Serialization.InstanceDescriptor konvertieren.
   bei System.ComponentModel.TypeConverter.GetConvertToException(Object value, Type destinationType)
   bei System.ComponentModel.TypeConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
   bei Stimulsoft.Report.CodeDom.StiCodeDomSerializator.GetArgumentsWithParent(Type type, Object value, Object parentValue)
   bei Stimulsoft.Report.CodeDom.StiCodeDomSerializator.GetArguments(Type type, Object value)
   bei Stimulsoft.Report.CodeDom.StiCodeDomBusinessObjects.Serialize(StiCodeDomSerializator serializator, StiReport report, StiBusinessObject data, Boolean isParent, CodeTypeDeclaration parentType, CodeConstructor parentConstructor)
   bei Stimulsoft.Report.CodeDom.StiCodeDomBusinessObjects.Serialize(StiCodeDomSerializator serializator, StiReport report)
   bei Stimulsoft.Report.CodeDom.StiCodeDomSerializator.Serialize(StiReport report, String name, StiLanguage language, Boolean serializeData, Boolean saveForInheritedReports, Object standaloneReportType)
   bei Stimulsoft.Report.StiReport.ScriptUnpack(Boolean saveForInheritedReports)
   bei Stimulsoft.Report.StiReport.ScriptUnpack()
   bei Stimulsoft.Report.Design.Editors.StiCodeEditor.OpenScript()
   bei Stimulsoft.Report.Design.Editors.StiCodeEditor.timerScriptGeneration_Tick(Object sender, EventArgs e)
   bei System.Windows.Forms.Timer.OnTick(EventArgs e)
   bei System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Here is a list of all assemblies I deploy (I know there are even some assemblies that are not allowed to deploy - I added them just to be sure):
  • Stimulsoft.Base.dll
    Stimulsoft.BusinessObjects.dll
    Stimulsoft.Controls.dll
    Stimulsoft.Controls.Win.dll
    Stimulsoft.Database.dll
    Stimulsoft.Design.dll
    Stimulsoft.Editor.dll
    Stimulsoft.Report.Check.dll
    Stimulsoft.Report.Compare.dll
    Stimulsoft.Report.Design.dll
    Stimulsoft.Report.dll
    Stimulsoft.ReportHelper.dll
    Stimulsoft.Report.Win.dll
If I install the whole Stimulsoft Solution (Stimulsoft Reports.Ultimate 2013.3.msi) on the target PC the report works as expected. So I guess that there are some dependencies which I don't know.

Does someone know what dll's are missing?

Thank you!
Mike Hachen
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: TypeConverter cannot convert from System.String

Post by HighAley »

Hello.

Please, check is there any older Stimulsoft assemblies on the target PC?
Try to look which assemblies are loaded with Fusion Log Viewer.

Thank you.
User avatar
ProIT
Posts: 28
Joined: Thu Oct 17, 2013 8:10 am
Location: Muttenz

Re: TypeConverter cannot convert from System.String

Post by ProIT »

Hello

No, there are definitely no older Stimulsoft assemblies on the target pc (it's a clean Installation, never used bevor PC). To "fix" the problem I had to install all assemblies (win, web etc) into the GAC. But this solution is just a workaround - so I really need a solution without installing all dll's to the GAC.

Thank you, Mike Hachen
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: TypeConverter cannot convert from System.String

Post by HighAley »

Hello, Mike.

In addition to the link in my previous post you could read the How the Runtime Locates Assemblies article.
You could read there where the common language runtime looks for assemblies.

Thank you.
duheng
Posts: 8
Joined: Thu Sep 26, 2013 6:54 pm

Re: TypeConverter cannot convert from System.String

Post by duheng »

Hello,

I am having the exactly same issue. I am using 2014.1.1815.0. If you put the dlls in GAC, everything works fine. No old version on the machine.

I also tried 2013.3.1800.0; 2014.1.1814.0. Both have the same issue.

But, if I try the production version 2013.3.1703. It works perfectly fine without putting the dlls in GAC.

I think there might be issues in these prerelease build dlls. Hope StimulSoft can investigate as soon as possible.

BTW, when will you guys release the next production version?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: TypeConverter cannot convert from System.String

Post by HighAley »

Hello.

We need an additional time for analyzing of this issue.

Thank you.
EichnerB
Posts: 1
Joined: Sat May 31, 2014 7:19 pm

Re: TypeConverter cannot convert from System.String

Post by EichnerB »

Hello,
is there a solution for this Problem?
I have the same Problem. I wrote an addin for Revit 2013. There it works. But under Revit 2014 this problem appears.

greetings
Bernd
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: TypeConverter cannot convert from System.String

Post by Alex K. »

Hello,

We checked out a lot of changes and found no problems. Could you clarify the following - the problem is reproduced on all computers or only a few ones. If not on all, then, give us their specifications.

Thank you.
Post Reply