• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 723
  • Last Modified:

How do I run a Crystal Report in PHP

I'm fairly well up on straight PHP but don't know much about Crystal Reports and know even less about how to get the two to work together.
A friend and I have managed to create a crystal report that we can run directly localhost.
I have created a php ticket logging website which has a page ready to be coded up to hold the report.
Basically this is a stats report on a database ticket system. Once a month we would like someone to be able to run the report via the website rather than directly on the machine.

I would like some advice on where to start. I have had a good look through other questions but they all seem to be about errors people are facing. What I need is help on where to start. I have PHP running on a windows machine with an sql database. I have absolutely no idea where to go from here. Any advice would be greatly appreciated, even if its just a link to another answer which I have missed that explains stuff from the start.

Thanks in advance
  • 2
  • 2
1 Solution
Beverley PortlockCommented:
If there is a command line option for running a crystal report then you could look at using exec()


You say you can run it directly via localhost - do you mean on the local host or via the ip pseudo-address localhost?
senda_letterAuthor Commented:
I am not aware of a way to run it by command line but that doesnt mean there isnt.

I can run it in crystal reports on the machine itself using the crystal reports software.
Beverley PortlockCommented:
If there is no command line option then the COM interface may be your only hope.


These are installed as part of the Windows Installation of PHP, but I have no idea about COM programming (not being a Windows type). I did come across this


$cr=new com("Crystal.CRPE.Application") or die("cannot load cr com");

Hope that helps
senda_letterAuthor Commented:
Thanks. I'll give that a try see if it works.
THere is no command line interface to Crystal.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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