Skip to Content
0
Former Member
May 26, 2011 at 05:57 AM

AxCrystalActiveXReportViewer Error

119 Views

i had a windows application that was built in .net2003 and then i converted it into .net2010 with sap crystal reports 2010. i have a tab control named as Reports in my application. Reports are created dynamically using AxCrystalActiveXReportViewer and crystal reports reportdocument. as i click the Reports tab, i m getting the error:

System.Reflection.TargetInvocationException: Unable to get the window handle for the 'AxCrystalActiveXReportViewer' control. Windowless ActiveX controls are not supported. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

at System.Windows.Forms.UnsafeNativeMethods.IOleObject.DoVerb(Int32 iVerb, IntPtr lpmsg, IOleClientSite pActiveSite, Int32 lindex, IntPtr hwndParent, COMRECT lprcPosRect)

at System.Windows.Forms.AxHost.DoVerb(Int32 verb)

at System.Windows.Forms.AxHost.InPlaceActivate()

--- End of inner exception stack trace ---

at System.Windows.Forms.AxHost.InPlaceActivate()

at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)

at System.Windows.Forms.AxHost.CreateHandle()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

The application is successfully running on windows XP with visual studio 2008. but generating the above error on windows vista as well as windows 7. i have to make my application to work on vista and windows 7. can any one tell me how can i rectify this error??

Thanx