on 03-09-2015 3:12 PM
Hello,
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) ?
$etat="C:\\Users\\test\\Documents\\testCrystal.rpt";
try
{
$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 ?
Sincerly
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.