I want to create a report on server side, to generate a PDF file to show to the user, using Windows, Apache Server and PHP. Actually I'm using VPEP 7R2, the code I'm trying to use is the following:
<?php
//------ Variables ------
$my_pdf = "C:\\XAMPP\htdocs\\sier\\vpe\\MyReport.pdf";
//------ Create a new COM Object of Crytal Reports 10 ------
$ObjectFactory= new COM("VpeControl.VpeControl.70");
//------ Open your rpt file ------
$Report = new TVpeControl;
$Report->OpenDoc();
$Report->Print(1.5, 1, "Hello World!");
$Report->Picture(1.5, 2, $Report->nFree, $Report->nFree, "example.jpg");
$Report->WriteDoc($my_pdf);
$Report->CloseDoc();
?>
It sends and error in COM call, does anyone have an idea why it doesn't works.