I am a new at PHP and I am trying to get PHP and Crystal 8.5 to cooperate but it works sometimes about three to four times and then I keep getting the ambiguous 'Server not yet opened' error message.
I have been Googling for days without much success.
My code is below can anyone point me in the right direction please. I am using PHP 5.
<?php
$cr_report = "C:\\wamp\\www\\site\\Report1.rpt";
$exp_pdf = "C:\\wamp\\www\\site\\test1.pdf";
$ObjectFactory= New COM("CrystalRuntime.Application.8.5");
$creport = $ObjectFactory->OpenReport($cr_report, 1);
$creport->ExportOptions->DiskFileName=$exp_pdf;
$creport->ExportOptions->PDFExportAllPages=true;
$creport->ExportOptions->DestinationType=1;
$creport->ExportOptions->FormatType=31;
$creport->Export(false);
$len = filesize($exp_pdf);
header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=$exp_pdf");
readfile($exp_pdf);
?>


