Page 1 of 1

Crystal Report in PHP

Posted: Thu Aug 30, 2007 12:01 pm
by dazed_confused
I am trying to run a Crystal Report accessing data in a MYSQL database in PHP. Although my desktop machine is W2K our PHP server is LINUX
PHP:
$crapp = new COM("CrystalRuntime.Application.11"); or die("cannot load cr com");
$my_report="C:\reports\report1.rpt";
$creport = $crapp->OpenReport($my_report,1);

I get the error FATAL error: Cannot instantiate non-existent class: com in /srv/www/htdocs/blah blah blah

any ideas on how to get around this. The other application developer here tells me that I can't use Com to call Crystal Reports because it is for PHP on Windows only.

I tried looking at the SOAP libraries but got totally lost.

Posted: Thu Aug 30, 2007 12:14 pm
by onion2k
Yep, the other dev is right. Crystal Reports COM interface is Windows only. If you're on Linux I'm pretty sure you can't use Crystal Reports from PHP.