I am trying to use the sample code in the CR XI R2 documentation and am having trouble.
The machine I am developing on has CR IX installed in addition to CR XI.
I am using Visual C++ 6.
When I try the sample code, it crashes when I acess a NULL pointer m_Application.
m_Report = m_Application->OpenReport(ReportPath, dummy);
The pointer is NULL because the call m_Application.CreateInstance ("CrystalRuntime.Appplication.115") fails.
If I replace the m_Application.CreateInstance call with
m_Application.CreateInstance ("CrystalDesignRuntime.Application"); it does not crash and the report shows. But, how do I know if I am getting the CR XI version rather than the CR IX version?
I have had to vary the code from the example -- the #import failed because the craxdrt.dll was in a different place.
Update as of Mar 10, 2010
I tried adding the printing code as outlined in the sample code --
I had to change the m_Application.CreateInstance call's argument to "CrystalDesignRuntime.Application" as above.
However, it now crashes in the destructor of the application (MyRDCApp).
Edited by: Albert Beard on Mar 10, 2010 5:01 PM