cancel
Showing results for 
Search instead for 
Did you mean: 

My application crashes when I try to print a report using Windows XP sp3

Former Member
0 Kudos

- version: 13.0.4 (32bit)

- CLR: 4.0

- plattform: WPF (Windows Presentation Foundation)

I'm using the WPF Crystal Report Viewer. If I click the print button, the application simply crashes showing the window telling you that you could send this information to microsoft.

To avoid any other chance of bug, I developed a sample app with a Report within showing just a label. It only happens on Windows XP. On Windows 7 or Vista machines, it prints just fine.

I disabled the firewall and antivirus as well and I run the app with administrative priviledges.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

On the Win XP computer, check the following:

1) A default printer driver is installed

2) You are using the latest updates for that printer driver

3) The printer driver is designed for Win XP (not WIN 7, Vista, etc.)

4) In the report, go to the Print Options and enable the "No Printer" option

5) See if setting another printer driver as default will help

If none of the above helps, what is the name of the printer on that XP box?

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hi,

I tried all the suggestions mentioned above. I noticed that the print option now opens, because it wasn't working. That because I checked the "No printer" option. I guess it should be checked on version 13.0.4

I tried to print the report and the problem remains. I'd like to send you my sample. It's really simple and it could help to clarify things. I was wondering if anyone else had this same issue on WinXP?

Rodrigo

former_member188030
Active Contributor
0 Kudos

Hi Rodrigo,

Few more questions.

Is there anything in Event Viewer (error / exception) on XP machine?

What is the target platform of the application i.e. X86, X64?

Are all your boxes (Win XP, WIn 7, and Vista) are 32 bit or 64 bit?

Are you trying to print to the same (shared) printer from all mahines?

Could you reproduce this with SP3 for CR for VS 2010?

- Bhushan

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Getting started and moving ahead with Crystal Reports .NET applications.

Former Member
0 Kudos

Hi Bhushan,

- Application is targeting 32bit apps

- The app is running both on 64 and 32 bit machines. The problem is found on 32 bit machines

- I printed the report on the same shared printer and the problem exists on the 32bit XP machine

- I haven't downloaded v13.0.3 nor I tested it . I owe you that.

- From the Event  Viewer I found that the problem would come from the report paging when printing. Please take a look on the text below (initial text in spanish):

------------------------------------------------

Tipo de suceso (event type):    Error

Origen del suceso (event source):    .NET Runtime

Categoría del suceso (category):    Ninguno (none)

Id. suceso (event ID):    1026

Fecha (Date):        2012/11/17

Hora (hour):        05:46:43 a.m.

Descripción:

Aplicación: TestCrystalReports.exe

Framework: v4.0.30319

Descripción (Description): el proceso terminó debido a una excepción no controlada. (The process ended because of an unhandled exception)

Información de la excepción: System.ArgumentException

STACK:

   en System.Windows.Size..ctor(Double, Double)

   en SAPBusinessObjects.WPF.Viewer.ReportPaginator.GetPage(Int32)

   en System.Windows.Xps.Serialization.Toolbox.GetPage(System.Windows.Documents.DocumentPaginator, Int32)

   en System.Windows.Xps.Serialization.NgcDocumentPaginatorSerializer.SerializeObject(System.Object)

   en System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(System.Object)

   en System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(System.Object, Boolean)

   en System.Windows.Xps.XpsDocumentWriter.Write(System.Windows.Documents.DocumentPaginator)

   en System.Windows.Controls.PrintDialog.PrintDocument(System.Windows.Documents.DocumentPaginator, System.String)

   en SAPBusinessObjects.WPF.Viewer.PrintControl.Print()

   en SAPBusinessObjects.WPF.Viewer.ReportAlbum.PrintReport()

   en SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer.PrintReport_Executed(System.Object, System.Windows.Input.ExecutedRoutedEventArgs)

   en System.Windows.Input.CommandBinding.OnExecuted(System.Object, System.Windows.Input.ExecutedRoutedEventArgs)

   en System.Windows.Input.CommandManager.ExecuteCommandBinding(System.Object, System.Windows.Input.ExecutedRoutedEventArgs, System.Windows.Input.CommandBinding)

   en System.Windows.Input.CommandManager.FindCommandBinding(System.Windows.Input.CommandBindingCollection, System.Object, System.Windows.RoutedEventArgs, System.Windows.Input.ICommand, Boolean)

   en System.Windows.Input.CommandManager.FindCommandBinding(System.Object, System.Windows.RoutedEventArgs, System.Windows.Input.ICommand, Boolean)

   en System.Windows.Input.CommandManager.OnExecuted(System.Object, System.Windows.Input.ExecutedRoutedEventArgs)

   en System.Windows.UIElement.OnExecutedThunk(System.Object, System.Windows.Input.ExecutedRoutedEventArgs)

   en System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(System.Delegate, System.Object)

   en System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)

   en System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)

   en System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)

   en System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)

   en System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)

   en System.Windows.Input.RoutedCommand.ExecuteImpl(System.Object, System.Windows.IInputElement, Boolean)

   en System.Windows.Input.RoutedCommand.ExecuteCore(System.Object, System.Windows.IInputElement, Boolean)

   en MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)

   en System.Windows.Controls.Primitives.ButtonBase.OnClick()

   en System.Windows.Controls.Button.OnClick()

   en System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)

   en System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)

   en System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)

   en System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)

   en System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)

   en System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)

   en System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)

   en System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)

   en System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)

   en System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)

   en System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)

   en System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)

   en System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)

   en System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)

   en System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)

   en System.Windows.Input.InputManager.ProcessStagingArea()

   en System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)

   en System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)

   en System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)

   en System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)

   en System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   en MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   en MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

   en System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   en MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   en System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

   en MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   en MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

   en System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)

   en System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)

   en System.Windows.Application.RunDispatcher(System.Object)

   en System.Windows.Application.RunInternal(System.Windows.Window)

   en System.Windows.Application.Run(System.Windows.Window)

   en System.Windows.Application.Run()

   en TestCrystalReports.App.Main()

Para obtener más información, vea el Centro de ayuda y soporte técnico en http://go.microsoft.com/fwlink/events.asp.

a

Former Member
0 Kudos

I'm affraid there wasn't a response about this issue. I had to place my own button over the print button and I called the PrintToPrinter method.

Please, fix that issue so the WPF Viewer can be useful

Answers (0)