Unhandled exception when adding anything from the toolbar

Stimulsoft Reports.NET discussion
Post Reply
tari95
Posts: 2
Joined: Mon Oct 17, 2016 11:34 am

Unhandled exception when adding anything from the toolbar

Post by tari95 »

Hi everyone, i've been encharge to to the conversion of our software from V1 to V2.
I get an unhandled exception whenever i try to add anything from the toolbar (for ex. the text component).
I'm also not able to copy and paste. This happen only in my V2.

This is my V1 code :

Code: Select all

Dim sti As New Stimulsoft.Report.StiReport
            With sti.Designer

                .CanDesignerChangeReportFileName = False
                .DontAskSaveReport = True
                ' .Icon = Me.Icon
                '.ReportNeverSave = True
            End With
            sti.Load(bt)
            sti.ReportFile = dms.tmpDirectory & "\forms\" & FormName
            sti.Design()


And this V2 :

Code: Select all

      Dim sti As New StiReport
                sti.Load(bt)
                StiOptions.Designer.AllowUseDragDrop = False
                StiOptions.Viewer.AllowUseDragDrop = False
                sti.Design()
Can someone please help me with this?
And this is the exception error i get :

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: DragDrop registration did not succeed. ---> System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.
at System.Windows.Forms.Control.SetAcceptDrops(Boolean accept)
--- End of inner exception stack trace ---
at System.Windows.Forms.Control.SetAcceptDrops(Boolean accept)
at System.Windows.Forms.Control.OnHandleCreated(EventArgs e)
at System.Windows.Forms.Control.WmCreate(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Stimulsoft.Editor.SyntaxEdit.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Navigator
Assembly Version: 4.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Navigator.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
DmsBaseClass
Assembly Version: 4.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/DmsBaseClass.DLL
----------------------------------------
DmsDiary
Assembly Version: 4.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/DmsDiary.DLL
----------------------------------------
DmsControls
Assembly Version: 4.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/DmsControls.DLL
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
DmsPickUtilities
Assembly Version: 4.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/DmsPickUtilities.DLL
----------------------------------------
DmsObjects
Assembly Version: 4.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/DmsObjects.DLL
----------------------------------------
DmsServer
Assembly Version: 4.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/DmsServer.DLL
----------------------------------------
System.Messaging
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Messaging/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Messaging.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
DevExpress.Utils.v16.1
Assembly Version: 16.1.6.0
Win32 Version: 16.1.6.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/DevExpress.Utils.v16.1/v4.0_16.1.6.0__b88d1754d700e49a/DevExpress.Utils.v16.1.dll
----------------------------------------
DevExpress.Data.v16.1
Assembly Version: 16.1.6.0
Win32 Version: 16.1.6.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/DevExpress.Data.v16.1/v4.0_16.1.6.0__b88d1754d700e49a/DevExpress.Data.v16.1.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
DevExpress.XtraEditors.v16.1
Assembly Version: 16.1.6.0
Win32 Version: 16.1.6.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/DevExpress.XtraEditors.v16.1/v4.0_16.1.6.0__b88d1754d700e49a/DevExpress.XtraEditors.v16.1.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
DmsForms
Assembly Version: 4.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/DmsForms.DLL
----------------------------------------
Stimulsoft.Report
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Report.DLL
----------------------------------------
DevExpress.XtraBars.v16.1
Assembly Version: 16.1.6.0
Win32 Version: 16.1.6.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/DevExpress.XtraBars.v16.1/v4.0_16.1.6.0__b88d1754d700e49a/DevExpress.XtraBars.v16.1.dll
----------------------------------------
DevExpress.XtraGrid.v16.1
Assembly Version: 16.1.6.0
Win32 Version: 16.1.6.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/DevExpress.XtraGrid.v16.1/v4.0_16.1.6.0__b88d1754d700e49a/DevExpress.XtraGrid.v16.1.dll
----------------------------------------
System.ComponentModel.DataAnnotations
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
----------------------------------------
System.Data.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Data.Linq.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
WindowsBase
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
DevExpress.Mvvm.v16.1
Assembly Version: 16.1.6.0
Win32 Version: 16.1.6.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/DevExpress.Mvvm.v16.1/v4.0_16.1.6.0__b88d1754d700e49a/DevExpress.Mvvm.v16.1.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
Stimulsoft.Base
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Base.DLL
----------------------------------------
Stimulsoft.Report.Design
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Report.Design.DLL
----------------------------------------
Stimulsoft.Controls.Win
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Controls.Win.DLL
----------------------------------------
Stimulsoft.Report.Check
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Report.Check.DLL
----------------------------------------
Stimulsoft.Report.Helper
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Report.Helper.DLL
----------------------------------------
Stimulsoft.Report.Win
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Report.Win.DLL
----------------------------------------
Stimulsoft.Controls
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Controls.DLL
----------------------------------------
Stimulsoft.Editor
Assembly Version: 2014.3.0.0
Win32 Version: 2014.3.0.0
CodeBase: file:///C:/Projects/Navigator/V2/Navigator/bin/Debug/Stimulsoft.Editor.DLL
----------------------------------------
Microsoft.mshtml
Assembly Version: 7.0.3300.0
Win32 Version: 7.0.3300.0
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Unhandled exception when adding anything from the toolba

Post by HighAley »

Hello.

We need to reproduce the issue to help you.
Please, send us a sample project that reproduces the issue.

Thank you.
Post Reply