note 72955 added to ref.com

From: Date: Mon, 05 Feb 2007 20:10:46 +0000
Subject: note 72955 added to ref.com
Groups: php.notes 
Request: Send a blank email to php-notes+get-122893@lists.php.net to get a copy of this message
This code use a Crystal Reports file with a connection on Oracle 9i Database, suports manipulate and refresh data and export to PDF file: ------ REMEMBER ------ These functions are only available if you had instaled the Crystal Reports Developer Edition. Catch the trial on the http://www.businessobjects.com web site. //------ Variables ------ $my_report = "C:\\rel_apontamento.rpt"; $my_pdf = "C:\\teste.pdf"; //------ Create a new COM Object of Crytal Reports XI ------ $ObjectFactory= new COM("CrystalReports11.ObjectFactory.1"); //------ Create a instance of library Application ------- $crapp =$ObjectFactory-> CreateObject("CrystalDesignRunTime.Application.11"); //------ Open your rpt file ------ $creport = $crapp->OpenReport($my_report, 1); //------ Connect to Oracle 9i DataBase ------ $crapp->LogOnServer('crdb_oracle.dll','YOUR_TNS', 'YOUR_TABLE','YOUR_LOGIN','YOUR_PASSWORD'); //------ Put the values that you want -------- $creport->RecordSelectionFormula= "{YOUR_TABLE.FIELD}='ANY_VALUE'"; //------ This is very important. DiscardSavedData make a Refresh in your data ------- $creport->DiscardSavedData; //------ Read the records :-P ------- $creport->ReadRecords(); //------ Export to PDF ------- $creport->ExportOptions->DiskFileName=$my_pdf; $creport->ExportOptions->FormatType=31; $creport->ExportOptions->DestinationType=1; $creport->Export(false); //------ Release the variables $creport = null; $crapp = null; $ObjectFactory = null; It's functional and perfectly !!!!!!! Thanks..... ---- Server IP: 82.165.230.124 Probable Submitter: 200.229.133.146 ---- Manual Page -- http://www.php.net/manual/en/ref.com.php Edit -- https://master.php.net/note/edit/72955 Del: integrated -- https://master.php.net/note/delete/72955/integrated Del: useless -- https://master.php.net/note/delete/72955/useless Del: bad code -- https://master.php.net/note/delete/72955/bad+code Del: spam -- https://master.php.net/note/delete/72955/spam Del: non-english -- https://master.php.net/note/delete/72955/non-english Del: in docs -- https://master.php.net/note/delete/72955/in+docs Del: other reasons-- https://master.php.net/note/delete/72955 Reject -- https://master.php.net/note/reject/72955 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#122893) next »