Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CRXIR2 doesn't work with VS2010 on Windows 7 nor on Vista

We're upgrading from VS2005 to VS2010. We are almost there but there is a problem with Crystal Reports. We use the RDC (COM-based) component within our C++ application.

On Windows 7 or on VISTA, I can't get the viewer nor the designer controls working. I get Access Violations when the control is activated:

// from atlhost.h (line 2208)
hr = m_spOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, spClientSite, 0, m_hWnd, &m_rcPos);

The strange thing is that when I run the same exe on a XP machine, it seems to work.

We basically use "AtlAxWin100" window class to host the Crystal report control ("CrystalReports11.ActiveXReportViewer.1") in. I'm using the SP6 version of Crystal reports so that's the latest version.

Also, when I compile the same code with VS2005 and run it on Windows7 or Vista everything works out just fine.

Does anybody have any idea about what might cause the problem, or ideas for further investigations?

like image 356
tangens Avatar asked May 26 '10 10:05

tangens


2 Answers

it looks like it has something to do with DEP.

If we turn off the DEP completely on the system with

bcdedit /set Nx AlwaysOff

and then reboot of course, the Viewer works!

Unfortunately this is a system global turn off. We tried to turn off DEP for our exe alone before, but then we got a message from Windows that we were not allowed to turn off DEP for our exe...

like image 79
tangens Avatar answered Oct 20 '22 13:10

tangens


SAP considers the RDC dead.

Deprecated in 2006.

"the RDC was not tested and is thus not supported in any version of VS .NET." ...
"Note that version 12.x RDC is not licensed to be used in development under any circumstances. Does not mater what language. Also, note that with CR 2008 (v. 12.x), you will only find the crviewer.dll and the craxDDrt.dll. CraxDDrt.dll always required extra Report Creation API license anyhow."

The RDC is specifically designed around the COM technologies and is intended for use Visual Basic 6 developers; therefore, it is not recommended, nor tested, for use in a .NET application. ...
To support any issue encountered with the RDC in a .NET application, these issues need to be reproducible in a supported COM-based development tool (such as VB6).

Only version of CR supported in .NET 2010 is CR 2010 which does not ship the RDC (RDC was retired in CR 11.5). For more info re. .NET 2010 see the following ... [ ... later ... ] Also, because the platforms specifically states we only support the RDC in VS 6 and it's end of life is almost over there is nothing we can to do escalate the issue.
You really need to upgrade to .NET and the CR .NET assemblies. Using RAS is the replacement for the RDC.

Much of this information is at least six months old.

like image 1
Eric Towers Avatar answered Oct 20 '22 13:10

Eric Towers