i have the following code in my php script. it's for displaying a Crystal Report file.

$cr = new COM( "crystalruntime.application" );
    if ( $cr ) {
        $cr->OpenReport( "SelectExpert1.rpt", 1 );
    } 

if i try to access the file with this code on my browser i get the following error.

Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Crystal Reports ActiveX Designer<br/><b>Description:</b> File not found. Details: error' in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\moonlight\idtest.php:5 Stack trace: #0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\moonlight\idtest.php(5): com->OpenReport('SelectExpert1.r...', 1) #1 {main} thrown in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\moonlight\idtest.php on line 5

what could be the solution to this error?

Recommended Answers

File not found.

Check your report path.

Jump to Post

Does this require Internet Explorer (thinking of COM) or does it work with all browsers?

Jump to Post

All 6 Replies

File not found.

Check your report path.

Member Avatar

Clue: File not found
Where in the code the exception was thrown:

C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\moonlight\idtest.php on line 5

My crystal ball can't peek into your code from here.

i have corrected the mistake but the report is not being displayed

Member Avatar

Does this require Internet Explorer (thinking of COM) or does it work with all browsers?

it's supposed to work will all browsers but it's not

Member Avatar

I thought COM utilising ActiveX was IE only. I may be wrong.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.