Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 8th, 2003, 07:38 AM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to largecinq
Default Crystal Reports 9 and PHP

Hi everybody,

I have a BIG problem with Crystal Reports 9. I try to print a report from a PHP page and it doesn't seem to work. Could anyone give me a hint why it's not working ? (Code following)

$crapp = new COM("CrystalRuntime.Application.9");
$creport = $crapp->OpenReport("C:\\Foxserv\\www\\Etat1.rpt", 1);

$creport->DiscardSavedData();
$creport->ReadRecords();

echo 'Driver Name : ' . $creport->DriverName.' **<br>';
echo 'Printer Name : ' . $creport->PrinterName.' **<br>';
echo 'Port Name : ' . $creport->PortName.' **<br>';

$creport->SelectPrinter("HP LaserJet 1100(MS)", "HPLocal", "LPT1:");
$creport->PaperOrientation = 0;

$creport->PrintOut(False);
echo 'creport->PrintingStatus->Progress : ' . $creport->PrintingStatus->Progress . '<br>';

All this displays :

Driver Name : DISPLAY **
Printer Name : **
Port Name : **
creport->PrintingStatus->Progress : 3

I can't figure why the driver name is DISPLAY and it's killin' me

Thanx for all ideeas.



 
Old September 8th, 2003, 02:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I wish I could help you. I tried searching on Google and couldn't find the Crystal Reports COM API documented. Crystal Reports is commercial software, perhaps as a licensed user you can call them or look through their support pages for the documentation.

Also, whenever dealing with objects or complex variables in PHP, it helps to make use of the var_dump() and/or print_r() functions.
  http://www.php.net/var_dump
  http://www.php.net/print_r

They may shed some light on your object by displaying the internal variable structure.

Don't forget to wrap the output in <pre></pre> tags so it's readable.


Take care,

Nik
http://www.bigaction.org/
 
Old February 1st, 2005, 12:19 AM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to divya1111
Default

I need to generate crystal reports. I am using PHP & MySQL on Linux Platform. is it possible to generate crystal reports?? the internet is not helping me. If u can tell me what extra tools are to be installed and also give me a tinzy winzy example I will be able to continue.

divya
 
Old May 29th, 2006, 01:47 AM
Registered User
 
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Divya...
can you please send me some links or code regarding your problem...i too using Crystal reports XI...kindly send me or tell me abt "How to generate Crystal reports with PHP". i think we need to use some Third party tool for this..thanx in advance.
Raman

Raman Kheterpal
Web Programmer
Centre for IT Applications (CITA)
T E R I, India Habitat Centre,
Lodhi Road, New Delhi- 110003
 
Old July 10th, 2006, 07:02 AM
Registered User
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

please i want know how, to generate Crystal reports with PHP.

 
Old September 8th, 2006, 12:26 PM
Registered User
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Crystal Reports is a Windows only app

PHP COM function can interact with CR

Code:
you can do it with COM, check out
http://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);

I wish my computer would do what I want it to do, not what I tell it to do
 
Old June 5th, 2007, 02:05 PM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

did someone solve this problem?, Me too, I need to generate a Crystal reports format report with data from MySQL database and using PHP. all the anwsers I got are create a COM object and open a .rtp file, do something;

- My question is where can I get a .rtp file, is this file the final result for me?
- If this is the resulted file, someone will download and display with their Crystal Report software, then what I need is the export my data from database( as I did for CSV file) to .rtp file. is there a file in PHP to do that, or Crystal Report COM object has this functionality;


I really need your urgent help;


Thank you in advance


JZ

 
Old September 2nd, 2007, 05:16 AM
Registered User
 
Join Date: Sep 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi there,
please provide me some code sample of showing crystal report in php.

Mamun
[email protected]
 
Old July 17th, 2008, 06:53 AM
Registered User
 
Join Date: Jul 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi All,

I m tring to integrate the Crystal report wiht PHP

$COM_Object = "CrystalReports12.ObjectFactory.1";
$my_report = "C:\\Report1.rpt";
$ObjectFactory= New COM($COM_Object);
$creport = $ObjectFactory->OpenReport("c://report1.rpt", 1);

It gieves following error
>>>>>>>>>>>>>>>

Call to undefined method com::OpenReport()
please advice
santosh
 
Old July 18th, 2008, 04:52 AM
Registered User
 
Join Date: Jul 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by santosh5266
ANy setting in php.ini file?
 Hi All,

I m tring to integrate the Crystal report wiht PHP

$COM_Object = "CrystalReports12.ObjectFactory.1";
$my_report = "C:\\Report1.rpt";
$ObjectFactory= New COM($COM_Object);
$creport = $ObjectFactory->OpenReport("c://report1.rpt", 1);

It gieves following error
>>>>>>>>>>>>>>>

Call to undefined method com::OpenReport()
please advice
santosh
santosh





Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP with Crystal Reports XI khe_raman PHP How-To 0 May 29th, 2006 02:20 AM
how to get reports in crystal reports using ASP3.0 candy133 Classic ASP Basics 2 January 26th, 2006 08:26 AM
Comparitive Reports in Crystal Reports tarunm Crystal Reports 1 January 21st, 2006 01:08 AM
comparision among crystal reports and Data reports avats Crystal Reports 0 April 13th, 2005 01:01 PM
How to create/design reports with crystal reports BassmaniaQ Crystal Reports 0 December 14th, 2004 04:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.