From: mitohuffman at yahoo dot com dot mx Operating system: Windows XP SP2 PHP version: 5.1.4 PHP Bug Type: COM related Bug description: Unable to lookup "ParameterFieldDefinitions"
Description: ------------ I made a script that open a Crystal Reports file and export it to PDF. I set the database info, the RecordSelectionFormula string and de ExportOptions and all works fine. The problem comes when i try to call the ParameterFieldDefinitions class. GBY Reproduce code: --------------- $ObjectFactory= New COM("CrystalReports10.ObjectFactory.1"); $crapp = $ObjectFactory->CreateObject("CrystalDesignRunTime.Application"); $creport = $crapp->OpenReport($report, 1); $creport->Database->Tables->Item(1)->ConnectionProperties['User ID'] = "MyUser"; $creport->Database->Tables->Item(1)->ConnectionProperties['Password'] = "MyPass"; $creport->FormulaSyntax = 0; $creport->RecordSelectionFormula = "{V_CON_LOTES.ID_CONCURSO}=$id_concurso and {LOTES_CONCURSO_COTIZADOS.ID_ESTATUS}=1"; $param1 = $creport->ParameterFieldDefinitions->Item("fecha_imp"); // Error Point. I tried using Item(1) and i get the same error. Expected result: ---------------- Get the "Fecha_imp" parameter, set (before) in the Crystal Reports Designer, for setting the corresponding value. Actual result: -------------- Fatal error: Uncaught exception 'com_exception' with message 'Unable to lookup `ParameterFieldDefinitions': Nombre desconocido. ' in C:\Inetpub\wwwroot\Crystal_reports\test.php:19 Stack trace: #0 C:\Inetpub\wwwroot\Crystal_reports\test.php(19): unknown() #1 {main} thrown in C:\Inetpub\wwwroot\Crystal_reports\test.php on line 19 -- Edit bug report at http://bugs.php.net/?id=37562&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37562&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37562&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37562&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37562&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37562&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37562&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37562&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37562&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37562&r=support Expected behavior: http://bugs.php.net/fix.php?id=37562&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37562&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37562&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37562&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37562&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37562&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37562&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37562&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37562&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37562&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37562&r=mysqlcfg