473,395 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PHP & Crystal Reports - Can't quit ActiveX Designer session

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...;)

Sep 20 '06 #1
2 7532
NC
MartyInOz wrote:
>
"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..
What version of PHP are you using?
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.
Not really, but here are two possibilities:

1. Try to enumerate the CrystalRuntime.Application object
and see if anything has a name that sounds usable in
your situation:

$crapp = new COM ("CrystalRuntime.Application")
or die ("Error on load");
echo "<p>Enumerating CrystalRuntime.Application object:</p>";
$crapp->Reset();
while ($e = $crapp->Next()) {
echo "<p>$e</p>";
}

Obviously, this is a development-time hack; you should
put the code above into a separate script and delete the
script when you no longer need it.

2. If all else fails, use $crapp->Release() to force unloading
of the CrystalRuntime.Application object.

Cheers,
NC

Sep 20 '06 #2

NC wrote:
MartyInOz wrote:

"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..

What version of PHP are you using?
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.

Not really, but here are two possibilities:

1. Try to enumerate the CrystalRuntime.Application object
and see if anything has a name that sounds usable in
your situation:

$crapp = new COM ("CrystalRuntime.Application")
or die ("Error on load");
echo "<p>Enumerating CrystalRuntime.Application object:</p>";
$crapp->Reset();
while ($e = $crapp->Next()) {
echo "<p>$e</p>";
}

Obviously, this is a development-time hack; you should
put the code above into a separate script and delete the
script when you no longer need it.

2. If all else fails, use $crapp->Release() to force unloading
of the CrystalRuntime.Application object.

Cheers,
NC

Hi NC,

Thanks for your post.

I just upgraded to XAMPP as my PHP/Mysql package. It runs PHP5.1.6 and
hey presto my problem disappeared..!!...I can only think my older
version of PHP wasn't doing it's COM cleanup very well....

Cheers.....MartyInOz

Sep 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
2
by: Darrin | last post by:
Hello, I am looking for a web reporting solution. I have researched some things on crystal reports but read that the version that is bundled with Visual Studio 2003 does not allow you to print...
6
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel...
1
by: James | last post by:
Hello, I have developed a reporting application w/ASP.NET on IIS v5 utilizing the Crystal Reports v9 ActiveX Viewer. Another developer has produced several reports using the client version of...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
0
by: Big George | last post by:
Hello, I'm working with Visual Studio 2003 .NET and Crystal Reports for .NET. Database: Oracle 10g Develop PC: Windows XP I'm having problems trying to design a Crystal Report connecting to...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
0
by: Mark Gold | last post by:
Hi! We have a VB application using Crystal Reports 6 that has worked successfully on hundreds of systems for over 10 years. Now, on one network, the application and access database does not close....
2
by: Thefire | last post by:
Hello All i am using Bisness object Crystal Report XI version and installed it on my server. I have checked to installed as server. I am using the following code to connect and display the Report...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.