I am getting this exception when i call the GeneratePreview of the XamReportPreview class. I checked the code everything looks fine.
Exception Details:
System.AccessViolationException occurred Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Source="ReachFramework" StackTrace: at MS.Internal.Printing.Configuration.NativeMethods.GetPrintCapabilitiesThunk2Impl(SafePTProviderHandle handle, IntPtr printTicket, Int32 ptSize, IntPtr& printCapabilities, Int32& pcSize, String& errorMsg) at MS.Internal.Printing.Configuration.NativeMethods.GetPrintCapabilitiesThunk2(SafePTProviderHandle handle, IntPtr printTicket, Int32 ptSize, IntPtr& printCapabilities, Int32& pcSize, String& errorMsg) at MS.Internal.Printing.Configuration.PTProvider.GetPrintCapabilities(MemoryStream printTicket) at System.Printing.PrintTicketManager.GetPrintCapabilitiesAsXml(PrintTicket printTicket) at System.Printing.PrintTicketManager.GetPrintCapabilities(PrintTicket printTicket) at System.Printing.PrintQueue.GetPrintCapabilities(PrintTicket printTicket) at System.Windows.Controls.PrintDialog.UpdatePrintableAreaSize() at System.Windows.Controls.PrintDialog.get_PrintableAreaWidth() at Infragistics.Windows.Reporting.Report.UpdateSettingsFromPrintDialog(PrintDialog printDialog, Boolean dialogDisplayed) at Infragistics.Windows.Reporting.Report.InitializeReport(Boolean showPrintDialog) at Infragistics.Windows.Reporting.XamReportPreview.GeneratePreview(Report report, Boolean showPrintDialog, Boolean showReportProgressControl) at ClientApplication.ApplicationView.ShowPrintPreview(ShowPrintPreviewArgs args) in C:\WPCUATest\Common\ClientApplication\ApplicationView.xaml.cs:line 1658 InnerException:
Environment : .Net Framework 3.5 & .Net Framework 2.0 (SP 1 installed).
Any help would be apperciated.
Thanks
Ramesh Babu.
Hello Ramesh,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post, but I wasn't able to reproduce your behavior, so if this is still an issue for you, could you please send me an isolated sample project, where this is reproduced, so I can investigate it further for you.
Feel free to write me if you have further questions.