水晶报告与PHP

时间:2018-08-08 08:23:06

标签: php crystal-reports

我的Crystal报表有问题,我无法在php发送的变量和Crystal报表之间建立链接 这是我的代码:

  $app_obj = new COM("CrystalRuntime.Application") or Die ("Did not open");

    $etat="C:\\xampp\\htdocs\\Transport\\iparc\\iparc\\app\\webroot\\attachments\\rpt\\Rapport2.rpt"; // donner le chemain du rapport

    $rpt_obj=$app_obj->OpenReport($etat);
    $id=305;
    $rpt_obj->Database->Tables(1)->SetLogOnInfo("DSN", "texton", "root", "");
    $rpt_obj->EnableParameterPrompting = 0;

    $rpt_obj->RecordSelectionFormula= "{?id}='305'";

    $rpt_obj->ExportOptions->DiskFileName="C:\\xampp\\htdocs\\Transport\\iparc\\iparc\\app\\webroot\\attachments\\rpt\\Rapport2.pdf"; // chemain ou mettre le fichier pdf
    $rpt_obj->ExportOptions->PDFExportAllPages=true;
    $rpt_obj->ExportOptions->DestinationType=1; // Export to File
    $rpt_obj->ExportOptions->FormatType=31; // Type: PDF
    $rpt_obj->Export(false);
    $my_pdf = "C:\\xampp\\htdocs\\Transport\\iparc\\iparc\\app\\webroot\\attachments\\rpt\\Rapport2.pdf";

感谢您的帮助

0 个答案:

没有答案