Crystal Report 13和PHP集成错误

时间:2018-04-21 03:51:35

标签: php codeigniter iis crystal-reports crystal-reports-xi

我想整合php和crystal报表,即时通讯使用CI和sql server数据库并运行IIS。我已经安装了32位运行时因为我在64位Windows Server 2012中运行32位版本的php 7.0。我启用了32位应用程序IIS,现在我陷入了这个错误:

遇到未捕获的异常 键入:com_exception

消息:来源:未知

说明:未知

这是我在crystalreport.php上的构造

public function __construct($params){
    $CI =& get_instance();
    $this->_file = $params['file'];
    $this->_orientation = isset($params['orientation']) ? $params['orientation'] : "D";
    //echo $this->_path.$params['modul'].'/'.$this->_file.".rpt";exit;
    $this->_Object= new COM('CrystalReports13.ObjectFactory.1') or die ("Could not initialise Object.");

    $this->_App = $this->_Object->CreateObject('CrystalRuntime.Application.13') ;
    $this->_Report =  $this->_App->OpenReport($this->_path.$params['modul'].'/'.$this->_file.".rpt", 1);
    $this->_Report->EnableParameterPrompting = 0;
    $this->_config['server'] = $CI->db->hostname;
    $this->_config['database'] = $CI->db->database;
    $this->_config['uid'] = $CI->db->username;
    $this->_config['pass'] = $CI->db->password;

}

错误指向 CreateObject();

0 个答案:

没有答案