Неустранимая ошибка: необработанное исключение com_exception

<?php
$my_report = "D:\\wamp64\www\\report\\test.rpt";
$my_pdf = "D:\\wamp64\www\\report\\test.pdf";
$o_CrObjectFactory = new COM('CrystalReports115.ObjectFactory.1');
$o_CrApplication =$o_CrObjectFactory->CreateObject("CrystalDesignRunTime.Application");
$creport = $o_CrApplication->OpenReport($my_report, 1);
$o_CrApplication->LogOnServer('localhost','grn','root','');
$creport->RecordSelectionFormula="{parameter.id}='1'";

//------ This is very important. DiscardSavedData make a

// Refresh in your data -------

$creport->DiscardSavedData;

//------ Read the records :-P -------

$creport->ReadRecords();

//------ Export to PDF -------

$creport->ExportOptions->DiskFileName=$my_pdf;
$creport->ExportOptions->FormatType=31;
$creport->ExportOptions->DestinationType=1;
$creport->Export(false);

//------ Release the variables
$creport = null;
$crapp = null;
$ObjectFactory = null;
?>

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector