当尝试在php中调用Crystal Report 2008时,它显示以下错误消息:
致命错误:未捕获com_exception:无法创建COM对象 `CrystalRuntime.Application.12':中的无效语法 C:\ xampp \ htdocs \ xampp \ BISCOMHRMS \ attendancelogreport.php:8堆栈 跟踪:#0 C:\ xampp \ htdocs \ xampp \ BISCOMHRMS \ attendancelogreport.php(8): com-> com('CrystalRuntime ....')#1 {main}被抛出 C:\ xampp \ htdocs \ xampp \ BISCOMHRMS \ attendancelogreport.php在第8行
这是我的代码在php中调用水晶报表:
$ObjectFactory = new COM('CrystalRuntime.Application.12');
$creport = $ObjectFactory->OpenReport("D:\report\Attendance Reports.rpt",
1);
$creport->DiscardSavedData();
$creport->ReadRecords();