Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 135,912 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,551 people online right now. Registration is fast and FREE... Join Now!




How to connect to crystal report using PHP

 
Reply to this topicStart new topic

How to connect to crystal report using PHP

sunefeeling
21 May, 2008 - 07:18 PM
Post #1

New D.I.C Head
*

Joined: 21 May, 2008
Posts: 1

hi,i want to connect to crystal report using PHP,but i can not get the expected result,
CODE
$crapp = new COM("CrystalDesignRunTime.Application") or die("Error");
try {
$crapp->OpenReport("D:\\web\\www\\test\\Report1.rpt", 1);
}catch (Exception $oex){
    echo $oex->getMessage()."<br>";
    echo $oex->getLine();        
}
try {
$crapp->PaperOrientation = 0;
$crapp->SelectPrinter("winspool", "HP LaserJet 1200 Series PCL", "Ne01:");
$crapp->PrintOut(False);
}catch (Exception $ex){
    echo $ex->getMessage();
}

i got the infomation as follow:
Unable to lookup `PaperOrientation': unknow name

how can i connect the crystal report and meke it works?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 07:47AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month