Code: Select all
var sr_ReportBuilder = new StiReport();
sr_ReportBuilder.Load("Reports\\Report23.mrt");
sr_ReportBuilder.Show();
System.InvalidOperationException
HResult=0x80131509
Message=DragDrop registration did not succeed.
Source=System.Windows.Forms
StackTrace:
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 System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
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.
---------------------------------------------------------------