geeknout Posted August 16, 2011 Share Posted August 16, 2011 Hey Guys/Gals, I have been searching for a week now all over the web on how to possibly get cyrstal reports to open in php. I have been close a couple of times, but nothing definative. Its hard to believe that nobody has done this, there has to be an effective way. Any thoughts out there? Has anyone here done that? Quote Link to comment https://forums.phpfreaks.com/topic/244950-opening-crystal-reports-in-php-site/ Share on other sites More sharing options...
geeknout Posted August 16, 2011 Author Share Posted August 16, 2011 Just to give someone an idea, this one almost worked... meaning it seems like it reads the file, but never displays it. Of course I have to be able to pass information to Crystal $COM_Object = "CrystalRuntime.Application.8.5"; $my_report = "C:\\filename.rpt"; $my_pdf = "C:\\filename.pdf"; $crapp= New COM($COM_Object) or die("Unable to Create Object"); $creport = $crapp->OpenReport($my_report, 1); $creport->ReadRecords(); // attention! $creport->ExportOptions->DiskFileName=$my_pdf; $creport->ExportOptions->PDFExportAllPages=true; $creport->ExportOptions->DestinationType=1; // Export to File $creport->ExportOptions->FormatType=31; // Type: PDF $creport->Export(false); //------ Release the variables ------ $creport = null; $crapp = null; $ObjectFactory = null Quote Link to comment https://forums.phpfreaks.com/topic/244950-opening-crystal-reports-in-php-site/#findComment-1258264 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.