charlesparks
asked on
PHP / Crystal Reports 12
I am attempting to use a script I found to work with my application and some reports I have created in Crystal Reports 12.
I get the following error when trying to load.
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `CrystalRuntime.Applicatio n12': Invalid syntax ' in C:\xampp\htdocs\salesroomt ools\cryst al.php:2 Stack trace: #0 C:\xampp\htdocs\salesroomt ools\cryst al.php(2): com->com('CrystalRuntime.. ..') #1 {main} thrown in C:\xampp\htdocs\salesroomt ools\cryst al.php on line 2
Any Ideas?! I can create new com objects with other applications without error...
I get the following error when trying to load.
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `CrystalRuntime.Applicatio
Any Ideas?! I can create new com objects with other applications without error...
<?php
$crapp = new com("CrystalRuntime.Application.12") or die ("Error on load");
$creport = $crapp->OpenReport("c:/test.rpt", 1);
$creport->ExportOptions->DiskFileName="c:/test.rtf";
$creport->ExportOptions->DestinationType=1; // Export to File
$creport->ExportOptions->FormatType=4; // Type: RTF
$creport->DiscardSavedData();
$creport->Export(false);
$creport = null;
$crapp = null;
print "...done";
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Without feedback, I don't know if the code will work on CR 12 without modification.