Jump to content

PROBLEMS WITH COM (CRYSTAL REPORT 11 Y PHP 5)


ysabelafuentes

Recommended Posts

 

i'm having trouble getting started Crystal Reports XI with PHP 5 but i'm having trouble getting started.

 

Here's some code i used:

 


        $my_report = "C:\\Report3.rpt"; //rpt source file
        //-Create new COM object-depends on your Crystal Report version

        //This is line 79
        $ObjectFactory= new COM("CrystalReports11.ObjectFactory.1") or die ("Error on load"); // call COM port

        $crapp = $ObjectFactory->CreateObject("CrystalRuntime.Application.11.0.0.89327"); // create an instance for Crystal
        $creport = $crapp->OpenReport($my_report); // call rpt report

 

The error:

Fatal error: Uncaught exception 'com_exception' with message 'Source: Unknown
Description: Unknown' in C:\wamp\www\sivesst\system\application\controllers\pruebareportepdf.php on line 79

 

Does anybody know what module i'm missing or if i'm doing something wrong in php? I nedd some library?

Configurate pnp.ini? Configurate Crystal report?

I've never worked with COM before.

 

please help with the conection (step by step)!

 

Link to comment
Share on other sites

 

 

Installation

 

There is no installation needed to use these functions; they are part of the PHP core.

 

The Windows version of PHP has built-in support for this extension. You do not need to load any additional extensions in order to use these functions.

 

You are responsible for installing support for the various COM objects that you intend to use (such as MS Word); we don't and can't bundle all of those with PHP.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.