Hello i just want to know what will i do in this kind of error... this is the code...
<?php
//For use parameters with PHP this is a Code Example
$ObjectFactory= New COM("CrystalRuntime.Applic
ation.11")
;
$crapp = $ObjectFactory->CreateObje
ct("Crysta
lDesignRun
Time.Appli
cation");
$creport = $ObjectFactory->OpenReport
("//Report
1.rpt", 1);
$z= $creport->ParameterFields(
1)->SetCur
rentValue(
"Mango");
$z= $creport->ParameterFields(
2)->SetCur
rentValue(
5000);
$creport->ExportOptions->D
iskFileNam
e="reporti
n.pdf";
$creport->ExportOptions->P
DFExportAl
lPages=tru
e;
$creport->ExportOptions->D
estination
Type=1; $creport->ExportOptions->F
ormatType=
31;
$creport->Export(false);
$len = filesize("reportin.pdf");
header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Dispositio
n: inline; filename=reportin.pdf");
readfile("reportin.pdf");
?>
the error message is:
Fatal error: Call to undefined method com::CreateObject() in C:\xampp\htdocs\CR\report.
php on line 7
kindly reply... thanks
Start Free Trial