2012-11-14 54 views
0

這個問題發生在使用WPF版本13.0.4downloaded from here(32位)打印時。水晶報表應用程序崩潰在Windows XP(WPF)

我使用WPF水晶報表查看器。如果我點擊打印按鈕,應用程序就會崩潰,顯示窗口,告訴您可以將此信息發送給Microsoft。

爲了避免錯誤的任何其他機會,我公司開發出內只是一個標籤與報表上的示例應用程序。然後在機器上出現問題與Windows XP Service Pack 3的

編輯:我追查以下堆棧跟蹤

at System.Windows.Size..ctor(Double, Double) 
at SAPBusinessObjects.WPF.Viewer.ReportPaginator.GetPage(Int32) 
at System.Windows.Xps.Serialization.Toolbox.GetPage(System.Windows.Documents.DocumentPaginator, Int32) 
at System.Windows.Xps.Serialization.NgcDocumentPaginatorSerializer.SerializeObject(System.Object) 
at System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(System.Object) 
at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(System.Object, Boolean) 
at System.Windows.Xps.XpsDocumentWriter.Write(System.Windows.Documents.DocumentPaginator) 
at System.Windows.Controls.PrintDialog.PrintDocument(System.Windows.Documents.DocumentPaginator, System.String) 
at SAPBusinessObjects.WPF.Viewer.PrintControl.Print() 
at SAPBusinessObjects.WPF.Viewer.ReportAlbum.PrintReport() 
at SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer.PrintReport_Executed(System.Object, System.Windows.Input.ExecutedRoutedEventArgs) 
at System.Windows.Input.CommandBinding.OnExecuted(System.Object, System.Windows.Input.ExecutedRoutedEventArgs) 
at System.Windows.Input.CommandManager.ExecuteCommandBinding(System.Object, System.Windows.Input.ExecutedRoutedEventArgs, System.Windows.Input.CommandBinding) 
at System.Windows.Input.CommandManager.FindCommandBinding(System.Windows.Input.CommandBindingCollection, System.Object, System.Windows.RoutedEventArgs, System.Windows.Input.ICommand, Boolean) 
at System.Windows.Input.CommandManager.FindCommandBinding(System.Object, System.Windows.RoutedEventArgs, System.Windows.Input.ICommand, Boolean) 
at System.Windows.Input.CommandManager.OnExecuted(System.Object, System.Windows.Input.ExecutedRoutedEventArgs) 
at System.Windows.UIElement.OnExecutedThunk(System.Object, System.Windows.Input.ExecutedRoutedEventArgs) 
at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(System.Delegate, System.Object) 
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) 
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs) 
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) 
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs) 
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean) 
at System.Windows.Input.RoutedCommand.ExecuteImpl(System.Object, System.Windows.IInputElement, Boolean) 
at System.Windows.Input.RoutedCommand.ExecuteCore(System.Object, System.Windows.IInputElement, Boolean) 
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean) 
at System.Windows.Controls.Primitives.ButtonBase.OnClick() 
at System.Windows.Controls.Button.OnClick() 

at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs) 
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs) 
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object) 
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) 
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs) 
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) 
at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent) 
at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs) 
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object) 
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) 
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs) 
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) 
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs) 
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs) 
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean) 
at System.Windows.Input.InputManager.ProcessStagingArea() 
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs) 
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport) 
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32) 
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef) 
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) 
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) 
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) 
at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) 
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) 
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) 
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) 
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame) 
at System.Windows.Application.RunDispatcher(System.Object) 
at System.Windows.Application.RunInternal(System.Windows.Window) 
at System.Windows.Application.Run(System.Windows.Window) 
at System.Windows.Application.Run() 
at TestCrystalReports.App.Main() 

回答

0

我的解決方案 我別無選擇,我把一個按鈕,在Crystal報表查看器的按鈕,我叫的ReportDocument的PrintToPrinter方法

0

您是否嘗試過在報告中的頁面設置刪除打印機的關聯?

+0

是我做到了。問題依然存在 –

0

我有同樣的問題。 崩潰與PrintDialog和枚舉現有​​打印機有關。

許多小時調試之後和使用Google我發現了一個工作溶液: 安裝(或重新安裝).NET框架3.5 SP1。 這將安裝'Microsoft XPS Document Writer'打印機驅動程序。

真的不知道爲什麼,但安裝後問題消失神奇。

相關問題