How do I run a Crystal Report in PHP

Hi,
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
senda_letterAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Beverley PortlockCommented:
If there is a command line option for running a crystal report then you could look at using exec()

http://uk2.php.net/manual/en/function.exec.php

You say you can run it directly via localhost - do you mean on the local host or via the ip pseudo-address localhost?
0
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.
0
Beverley PortlockCommented:
If there is no command line option then the COM interface may be your only hope.

http://uk.php.net/manual/en/class.com.php

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

http://tech.groups.yahoo.com/group/phpexperts/message/3231

$cr=new com("Crystal.CRPE.Application") or die("cannot load cr com");
$rn="F:\notes5\test.rpt";
$rap=$cr->OpenReport($rn);

Hope that helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
senda_letterAuthor Commented:
Thanks. I'll give that a try see if it works.
0
mlmccCommented:
THere is no command line interface to Crystal.

mlmcc
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.