System.ArgumentNullException未处理

2020-09-21 13:42发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


我正在使用VS 2015和Crystal Report 13.0.20。 我只是试图通过将Crystal Report Viewer放在3个WPF页面中来在WPF中创建示例应用程序。 当我一页一页地加载这3页时,然后使用空的Crystal Report Viewer成功加载了2次页,但是第三次​​应用程序崩溃了。

以下是相同的日志:

未处理System.ArgumentNullException
HResult = -2147467261
消息=值不能为空。
参数名称:resourceKey
ParamName = resourceKey
Source = SAPBusinessObjects.WPF.ViewerShared
StackTrace:
在RootLibrary.WPF.Localization.LocText.FormatOutput(对象输入)<>在RootLibrary.WPF.Localization.LocalizeDictionary.GetLocalizedObject [TType](String resourceAssembly,String resourceDictionary,String resourceKey,CultureInfo文化) br>在RootLibrary.WPF.Localization.LocText.HandleNewValue()
在RootLibrary.WPF.Localization.LocalizeExtension`1.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType,Object sender,EventArgs e)
在系统上 .Windows.WeakEventManager.ListenerList.DeliverEvent(System.Windows.WeakEventManager.ListenerList.DeliverEvent(系统中的对象发送者,EventArgs args,类型managerType)
的监听器和侦听器,对象发送者,EventArgs args,类型managerType)
。 Windows.WeakEventManager.DeliverEventToList(对象发送 er,在RootLibrary.WPF.Localization.LocalizeDictionary.WeakCultureChangedEventManager.Instance_OnCultureChanged()在RootLibrary.WPF.Localization.LocalizeDictionary.set_Culture(CultureInfo值)在SAPBusinessObjects的RootLibrary.WPF.Localization.LocalizeDictionary.WeakCultureChanged()
。 System.Windows.FrameworkElement.ApplyTemplate()的SAPBusinessObjects.WPF.Viewer.ViewerCore.OnApplyTemplate()
的System.Windows.FrameworkElement.MeasureCore(Size)的Viewer.ViewerCore.set_ProductLocale(CultureInfo值)
System.Windows.UIElement.Measure上的availableSize)
(大小availableSize)在System.Windows.Controls.DockPanel.MeasureOverride(上大小约束)处的

在System.Windows.FrameworkElement.MeasureCore(Size上大小)< br> System.Windows.UIElement.Measure(大小availableSize)
在MS.Internal.Helper.MeasureElementWithSingleChild(UIElement元素,大小约束)
在System.Windows.Controls.ContentPresenter.MeasureOverride(大小约束)< br>在System.Windows.FrameworkElement.Measure中 System.Windows.UIElement.Measure处的Core(Size availableSize)
System.Windows.FrameworkElement.MeasureCore处的System.Windows.Controls.Border.MeasureOverride(Size约束)
中的Core(Size availableSize)
System.Windows.UIElement.Measure上的availableSize)
(Size availableSize)在System.Windows.FrameworkElement.MeasureCore上的System.Windows.Controls.Control.MeasureOverride(大小约束)



在System.Windows.UIElement.Measure(Size availableSize)处
在System.Windows.Controls.Grid.MeasureOverride(尺寸约束)处
在System.Windows.FrameworkElement.MeasureCore(Size availableSize)处
MS.Internal.Helper.MeasureElementWithSingleChild(UIElement元素,大小约束)
处System.Windows.Controls.ContentPresenter.MeasureOverride(大小约束)
处的System.Windows.UIElement.Measure(Size availableSize)
位于System.Windows.UIElement.Measure(Size availableSize)
处的System.Windows.FrameworkElement.MeasureCore(Size availableSize)
System.Windows.FrameworkElement.MeasureCore(Size availableSize)
处的System.Windows.Controls.Border.MeasureOverride(大小约束)
System.Windows的System.Windows.UIElement.Measure(SizeavailableSize)
MS.Internal.Helper的System.Windows.FrameworkElement.MeasureCore(Size可用大小)
处的.Controls.Page.MeasureOverride(大小约束)
。 System.Windows.Controls.ContentPresenter.MeasureOverride(大小约束)
(System.Windows.FrameworkElement.MeasureCore(大小availableSize)
处System.Windows.UI.System中的MeasureElementWithSingleChild(UIElement元素,大小约束)
。 在System.Windows.ContextLayoutManager.UpdateLayout()处Measure(大小availableSize)
在System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()处System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)

在System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
中。 Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
在System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate回调,Object args,Int32 numArgs)< br> System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源,委托回调,对象args,Int32 numArgs,委托catchHandler)在System.Windows.Threading.DispatcherOperation.InvokeImpl()处在System.Windows .Threading.DispatcherOperation.InvokeInSecurityContext(对象状态)
在System.Threading.ExecutionContext.RunInternal(ExecutionContext执行上下文,ContextCallback回调,对象状态,布尔值saveSyncCtx)
在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback 在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback回调,对象st ate)
在MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executeContext,ContextCallback回调,对象状态)在System.Windows.Threading.DispatcherOperation.Invoke()在System.Windows.Threading.Dispatcher。 在System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,布尔值和已处理)处的ProcessQueue()
在MS.Win32.HwndWrapper.WndProc(IntPtr hwnd,Int32 msg, IntPtr wParam,IntPtr lParam,布尔值和已处理)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate回调,对象args,Int32 ArgArgs)
在System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority优先级,TimeSpan超时,委托方法,对象)处System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源,委托回调,对象args,Int32 numArgs,委托catchHandler) args,Int32 numArgs)
在MS.Win 32.HwndSubclass.SubclassWndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam)
在MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&msg)
在System.Windows.Threading.Dispatcher.PushFrameImpl(Dispatcher)
在System.Windows.Thread.Dispatcher.PushFrame(DispatcherFrame frame)处
在System.Windows.Application.RunDispatcher(对象忽略)处
在System.Windows.Application.RunInternal(窗口窗口)处
在System.Windows.Application.Run(窗口窗口)
在System.Windows.Application.Run()
在WpfApplication2.App.Main()在C:\ Users \ KAMAL \ Desktop \ WpfApplication2 \ WpfApplication2 \ obj \ x86 \ Debug \ App.g.cs:Line 0
在System.AppDomain._nExecuteAssembly(RuntimeAssembly Assembly,String [] args)
在System.AppDomain.ExecuteAssembly(String assemblyFile,Evidence assemblySecurity,String [ ] args)
,位于Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
,位于System.Threading.ThreadHelper.ThreadStart_Context(对象状态),位于System.Threading.Exe,
在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback回调,对象状态,布尔型syncSyncCtx)
在System.Threading.ExecutionContext处的cutionContext.RunInternal(ExecutionContext执行上下文,ContextCallback回调,对象状态,布尔类型的saveSyncCtx)
。 在System.Threading.ThreadHelper.ThreadStart()处运行(ExecutionContext执行上下文,ContextCallback回调,对象状态)

InnerException:

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


我正在使用VS 2015和Crystal Report 13.0.20。 我只是试图通过将Crystal Report Viewer放在3个WPF页面中来在WPF中创建示例应用程序。 当我一页一页地加载这3页时,然后使用空的Crystal Report Viewer成功加载了2次页,但是第三次​​应用程序崩溃了。

以下是相同的日志:

未处理System.ArgumentNullException
HResult = -2147467261
消息=值不能为空。
参数名称:resourceKey
ParamName = resourceKey
Source = SAPBusinessObjects.WPF.ViewerShared
StackTrace:
在RootLibrary.WPF.Localization.LocText.FormatOutput(对象输入)<>在RootLibrary.WPF.Localization.LocalizeDictionary.GetLocalizedObject [TType](String resourceAssembly,String resourceDictionary,String resourceKey,CultureInfo文化) br>在RootLibrary.WPF.Localization.LocText.HandleNewValue()
在RootLibrary.WPF.Localization.LocalizeExtension`1.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType,Object sender,EventArgs e)
在系统上 .Windows.WeakEventManager.ListenerList.DeliverEvent(System.Windows.WeakEventManager.ListenerList.DeliverEvent(系统中的对象发送者,EventArgs args,类型managerType)
的监听器和侦听器,对象发送者,EventArgs args,类型managerType)
。 Windows.WeakEventManager.DeliverEventToList(对象发送 er,在RootLibrary.WPF.Localization.LocalizeDictionary.WeakCultureChangedEventManager.Instance_OnCultureChanged()在RootLibrary.WPF.Localization.LocalizeDictionary.set_Culture(CultureInfo值)在SAPBusinessObjects的RootLibrary.WPF.Localization.LocalizeDictionary.WeakCultureChanged()
。 System.Windows.FrameworkElement.ApplyTemplate()的SAPBusinessObjects.WPF.Viewer.ViewerCore.OnApplyTemplate()
的System.Windows.FrameworkElement.MeasureCore(Size)的Viewer.ViewerCore.set_ProductLocale(CultureInfo值)
System.Windows.UIElement.Measure上的availableSize)
(大小availableSize)在System.Windows.Controls.DockPanel.MeasureOverride(上大小约束)处的

在System.Windows.FrameworkElement.MeasureCore(Size上大小)< br> System.Windows.UIElement.Measure(大小availableSize)
在MS.Internal.Helper.MeasureElementWithSingleChild(UIElement元素,大小约束)
在System.Windows.Controls.ContentPresenter.MeasureOverride(大小约束)< br>在System.Windows.FrameworkElement.Measure中 System.Windows.UIElement.Measure处的Core(Size availableSize)
System.Windows.FrameworkElement.MeasureCore处的System.Windows.Controls.Border.MeasureOverride(Size约束)
中的Core(Size availableSize)
System.Windows.UIElement.Measure上的availableSize)
(Size availableSize)在System.Windows.FrameworkElement.MeasureCore上的System.Windows.Controls.Control.MeasureOverride(大小约束)



在System.Windows.UIElement.Measure(Size availableSize)处
在System.Windows.Controls.Grid.MeasureOverride(尺寸约束)处
在System.Windows.FrameworkElement.MeasureCore(Size availableSize)处
MS.Internal.Helper.MeasureElementWithSingleChild(UIElement元素,大小约束)
处System.Windows.Controls.ContentPresenter.MeasureOverride(大小约束)
处的System.Windows.UIElement.Measure(Size availableSize)
位于System.Windows.UIElement.Measure(Size availableSize)
处的System.Windows.FrameworkElement.MeasureCore(Size availableSize)
System.Windows.FrameworkElement.MeasureCore(Size availableSize)
处的System.Windows.Controls.Border.MeasureOverride(大小约束)
System.Windows的System.Windows.UIElement.Measure(SizeavailableSize)
MS.Internal.Helper的System.Windows.FrameworkElement.MeasureCore(Size可用大小)
处的.Controls.Page.MeasureOverride(大小约束)
。 System.Windows.Controls.ContentPresenter.MeasureOverride(大小约束)
(System.Windows.FrameworkElement.MeasureCore(大小availableSize)
处System.Windows.UI.System中的MeasureElementWithSingleChild(UIElement元素,大小约束)
。 在System.Windows.ContextLayoutManager.UpdateLayout()处Measure(大小availableSize)
在System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()处System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)

在System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
中。 Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
在System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate回调,Object args,Int32 numArgs)< br> System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源,委托回调,对象args,Int32 numArgs,委托catchHandler)在System.Windows.Threading.DispatcherOperation.InvokeImpl()处在System.Windows .Threading.DispatcherOperation.InvokeInSecurityContext(对象状态)
在System.Threading.ExecutionContext.RunInternal(ExecutionContext执行上下文,ContextCallback回调,对象状态,布尔值saveSyncCtx)
在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback 在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback回调,对象st ate)
在MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executeContext,ContextCallback回调,对象状态)在System.Windows.Threading.DispatcherOperation.Invoke()在System.Windows.Threading.Dispatcher。 在System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,布尔值和已处理)处的ProcessQueue()
在MS.Win32.HwndWrapper.WndProc(IntPtr hwnd,Int32 msg, IntPtr wParam,IntPtr lParam,布尔值和已处理)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate回调,对象args,Int32 ArgArgs)
在System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority优先级,TimeSpan超时,委托方法,对象)处System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源,委托回调,对象args,Int32 numArgs,委托catchHandler) args,Int32 numArgs)
在MS.Win 32.HwndSubclass.SubclassWndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam)
在MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&msg)
在System.Windows.Threading.Dispatcher.PushFrameImpl(Dispatcher)
在System.Windows.Thread.Dispatcher.PushFrame(DispatcherFrame frame)处
在System.Windows.Application.RunDispatcher(对象忽略)处
在System.Windows.Application.RunInternal(窗口窗口)处
在System.Windows.Application.Run(窗口窗口)
在System.Windows.Application.Run()
在WpfApplication2.App.Main()在C:\ Users \ KAMAL \ Desktop \ WpfApplication2 \ WpfApplication2 \ obj \ x86 \ Debug \ App.g.cs:Line 0
在System.AppDomain._nExecuteAssembly(RuntimeAssembly Assembly,String [] args)
在System.AppDomain.ExecuteAssembly(String assemblyFile,Evidence assemblySecurity,String [ ] args)
,位于Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
,位于System.Threading.ThreadHelper.ThreadStart_Context(对象状态),位于System.Threading.Exe,
在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback回调,对象状态,布尔型syncSyncCtx)
在System.Threading.ExecutionContext处的cutionContext.RunInternal(ExecutionContext执行上下文,ContextCallback回调,对象状态,布尔类型的saveSyncCtx)
。 在System.Threading.ThreadHelper.ThreadStart()处运行(ExecutionContext执行上下文,ContextCallback回调,对象状态)

InnerException:

付费偷看设置
发送
4条回答
spaceman01
1楼 · 2020-09-21 14:13.采纳回答

尝试SP 22,我们在WPF查看器中修复了一些问题。

歪着头看世界
2楼-- · 2020-09-21 14:23

亲爱的戴尔,

我没有将报告附加到查看器窗口。 我只附加了WPF页面中的查看器窗口。 我有3个WPF页面,每个页面都有一个空的Crystal Viewer窗口。

我只是试图一一打开3个WPF页面,当我尝试打开第3页时,它崩溃了。 打开页面的顺序无关紧要。

希望能进一步说明我的问题。

蓋茨
3楼-- · 2020-09-21 14:32

关闭页面时是否关闭报告? 如果没有,那是你的问题。 Crystal SDK的活动报告会话数限制为5,此后在打开报告时将引发错误。 因此,您需要在关闭查看器窗口时显式关闭报告。

-戴尔

SC_Yao
4楼-- · 2020-09-21 14:06

大家好,

在这个问题上有人可以帮助我吗?

一周热门 更多>