You are here: PHP & Crystal Reports - Can't quit ActiveX Designer session « PHP Programming Language « IT news, forums, messages
PHP & Crystal Reports - Can't quit ActiveX Designer session

Posted by MartyInOz on 09/20/06 04:22

Hi,

I'm currently running Crystal Reports 8.5 from PHP using COM..(yes I
know that is an older version of Crystal)...I am also running PHP on
localhost.

The following code:

<?php
$crapp = new COM ("CrystalRuntime.Application") or die ("Error on
load");
$creport = $crapp->OpenReport("c:/test.rpt", 1);
$creport->ExportOptions->DiskFileName="c:/test.rtf";
$creport->ExportOptions->DestinationType=1; // Export to File
$creport->ExportOptions->FormatType=4; // Type: RTF
$creport->DiscardSavedData();
$creport->Export(false);

$creport = null;
$crapp = null;

print "...done";
?>

works fine until I run it more than 5 times, at which point I get the
error:

"Warning: Invoke() failed: Exception occurred. Source: Crystal Reports
ActiveX Designer Description: There are not enough Concurrent Access
Licenses to log you on. This system has 5 Concurrent Access
Licenses."..etc..etc..

Now I know why this is happening. I assume it is because I am not
closing the COM instances of 'Crystal Reports ActiveX Designer'. I am
setting the '$crapp' object to null but I guess this still leaves the
actual App instantiated. However, I can't find out how to
programmatically close the App. I have tried:

$crapp->Close();
$crapp->Quit();

Does anyone know either the command(s) I require to cleanup my 'Crystal
Reports ActiveX Designer' session, or if not, can you suggest a good
reference for the Crystal 8.5 COM commands because I can't find one.

Thanks...;)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация