[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

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\MyCustomer.rpt";
$crapp = new COM("CrystalRuntime.Application.10");
$creport = $crapp->OpenReport($reportToRun, 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\crystal1.php:4 Stack trace: #0 C:\Program Files\xampp\htdocs\xampp\crystal1.php(4): com->OpenReport('C:\Program File...', 1) #1 {main} thrown in C:\Program Files\xampp\htdocs\xampp\crystal1.php 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.
0
horalia
Asked:
horalia
  • 2
1 Solution
 
horaliaAuthor Commented:
This is the only response I have gotten since I opened up the question. I'll go ahead and award the points and close.
0
 
mlmccCommented:
Glad i could help

mlmcc
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now