Непонятки с переменными...
Добавлено: 02 май 2007, 10:49
Добавил в дизайнере в отчет переменные типа Datetime(nullable).
Следующий код вываливается с ошибкой
report.Load(@"D:\NewProject\......Report.mrt");
report["endDate"] = report["beginDate"] = Common.WorkingDate.Date;
A first chance exception of type 'System.FieldAccessException' occurred in Stimulsoft.Report.dll
'Project2006.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Transactions.resources\2.0.0.0_ru_b77a5c561934e089\System.Transactions.resources.dll', No symbols loaded.
System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/Sy ... работанное исключениеProject2006.exeSystem.FieldAccessException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Field 'beginDate'not found в Stimulsoft.Report.StiReport.set_Item(String name, Object value)
в Project2006.MainForm.repordDesignToolStripMenuItem_Click(Object sender, EventArgs e) в D:\NewProject\Project2006\Project2006\Forms\MainForm.cs:строка 287
в System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
в System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
в System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
в System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
в System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
в System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
в System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
в System.Windows.Forms.Control.WndProc(Message& m)
в System.Windows.Forms.ScrollableControl.WndProc(Message& m)
в System.Windows.Forms.ToolStrip.WndProc(Message& m)
в System.Windows.Forms.MenuStrip.WndProc(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
в System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
в System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.Run(Form mainForm)
в Project2006.Program.Main() в D:\NewProject\Project2006\Project2006\Program.cs:строка 121System.FieldAccessException: Field 'beginDate'not found
в Stimulsoft.Report.StiReport.set_Item(String name, Object value)
в Project2006.MainForm.repordDesignToolStripMenuItem_Click(Object sender, EventArgs e) в D:\NewProject\Project2006\Project2006\Forms\MainForm.cs:строка 287
в System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
в System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
в System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
в System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
в System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
в System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
в System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
в System.Windows.Forms.Control.WndProc(Message& m)
в System.Windows.Forms.ScrollableControl.WndProc(Message& m)
в System.Windows.Forms.ToolStrip.WndProc(Message& m)
в System.Windows.Forms.MenuStrip.WndProc(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
в System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
в System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.Run(Form mainForm)
в Project2006.Program.Main() в D:\NewProject\Project2006\Project2006\Program.cs:строка 121
Следующий код вываливается с ошибкой
report.Load(@"D:\NewProject\......Report.mrt");
report["endDate"] = report["beginDate"] = Common.WorkingDate.Date;
A first chance exception of type 'System.FieldAccessException' occurred in Stimulsoft.Report.dll
'Project2006.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Transactions.resources\2.0.0.0_ru_b77a5c561934e089\System.Transactions.resources.dll', No symbols loaded.
System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/Sy ... работанное исключениеProject2006.exeSystem.FieldAccessException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Field 'beginDate'not found в Stimulsoft.Report.StiReport.set_Item(String name, Object value)
в Project2006.MainForm.repordDesignToolStripMenuItem_Click(Object sender, EventArgs e) в D:\NewProject\Project2006\Project2006\Forms\MainForm.cs:строка 287
в System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
в System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
в System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
в System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
в System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
в System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
в System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
в System.Windows.Forms.Control.WndProc(Message& m)
в System.Windows.Forms.ScrollableControl.WndProc(Message& m)
в System.Windows.Forms.ToolStrip.WndProc(Message& m)
в System.Windows.Forms.MenuStrip.WndProc(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
в System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
в System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.Run(Form mainForm)
в Project2006.Program.Main() в D:\NewProject\Project2006\Project2006\Program.cs:строка 121System.FieldAccessException: Field 'beginDate'not found
в Stimulsoft.Report.StiReport.set_Item(String name, Object value)
в Project2006.MainForm.repordDesignToolStripMenuItem_Click(Object sender, EventArgs e) в D:\NewProject\Project2006\Project2006\Forms\MainForm.cs:строка 287
в System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
в System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
в System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
в System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
в System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
в System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
в System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
в System.Windows.Forms.Control.WndProc(Message& m)
в System.Windows.Forms.ScrollableControl.WndProc(Message& m)
в System.Windows.Forms.ToolStrip.WndProc(Message& m)
в System.Windows.Forms.MenuStrip.WndProc(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
в System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
в System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
в System.Windows.Forms.Application.Run(Form mainForm)
в Project2006.Program.Main() в D:\NewProject\Project2006\Project2006\Program.cs:строка 121