Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Php calling Crystal report 2008 (v12)


I found very old posts about this subject and given solutions are not working in my case.

Pc with Crystal report 2008 / Php 5.4.16 / Win 7 x32

I'm running Php in command line (script)

I want call crystal report to generate pdf file using COM object in my php script

The error comes with the message => Fatal error: Call to undefined method variant::OpenReport()

What's wrong with my script ?

Should it work (Php+Crystal) ?




     $ObjectFactory = new COM ( 'CrystalReports12.ObjectFactory.1' ); 


  catch ( exception $e ) 


     echo 'caught exception: ' . $e->getMessage () . ', error trace: ' . $e->getTraceAsString (); 


  $crapp = $ObjectFactory->CreateObject("CrystalReports12.ObjectFactory.1");

  $creport = $crapp->OpenReport($etat, 1);

any idea ?


Former Member

Hi Franck

I am not sure where you found the solution for CR 2008, but it was contravening the CR 2008 development licensing as it was using the COM SDK. That SDK was based on craxxdrt.dll, which was retired in version 11.5 of Crystal Reports. With CR 2008, you can find a similar file, namely craxddrt.dll, but you are not licensed to use it in development (it is there for internal reasons only). Additionally, if you do decide to go with craxddrt.dll anyhow, you will not be able to deploy the app as there is no CR 2008 COM runtime released (e.g.; no msm / msi).

The only licensed and supported SDKs are the SDK for .NET and Eclipse.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question