views:

120

answers:

3

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?

A: 

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...

tangens
Probably the reason why we couldn't turn it off is that we also have .NET code in our exe.However with editbin.exe /NXCOMPAT:NO myExe.exe you can turn it off for the exe only!
tangens
A: 

use FastReport .NET it works without any problems, and very friendly

Hayk