Lia Nungaray
asked on
Opening a report with PHP code
I would like to know if Crystal Reports can be used with PHP. I have the following PHP code:
<?php
$reportToRun="C:\Program Files\EasyPHP1-8\www\trout \MyCustome r.rpt";
$crapp = new COM("CrystalRuntime.Applic ation.10") ;
$creport = $crapp->OpenReport($report ToRun, 1);
?>
I get the following error:
Fatal error: Uncaught exception 'com_exception' with message 'Source: Crystal Reports ActiveX Designer
Description: Invalid directory.' in C:\Program Files\xampp\htdocs\xampp\c rystal1.ph p:4 Stack trace: #0 C:\Program Files\xampp\htdocs\xampp\c rystal1.ph p(4): com->OpenReport('C:\Progra m File...', 1) #1 {main} thrown in C:\Program Files\xampp\htdocs\xampp\c rystal1.ph p on line 4
If I comment out the fourth line, where the report is being opened, I get no error message. My ultimate goal is to pass parameters to Crystal Reports, and have the user run the report from a web page. I am using Crystal Reports 10, Professional version. If this task is too much of a pain to accomplish using PHP, I am open to other technologies. Any suggestions will be appreciated. Thanks.
<?php
$reportToRun="C:\Program Files\EasyPHP1-8\www\trout
$crapp = new COM("CrystalRuntime.Applic
$creport = $crapp->OpenReport($report
?>
I get the following error:
Fatal error: Uncaught exception 'com_exception' with message 'Source: Crystal Reports ActiveX Designer
Description: Invalid directory.' in C:\Program Files\xampp\htdocs\xampp\c
If I comment out the fourth line, where the report is being opened, I get no error message. My ultimate goal is to pass parameters to Crystal Reports, and have the user run the report from a web page. I am using Crystal Reports 10, Professional version. If this task is too much of a pain to accomplish using PHP, I am open to other technologies. Any suggestions will be appreciated. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad i could help
mlmcc
mlmcc
ASKER