Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/266.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用JavaBridge、php和Ireport进行报告_Php_Jasper Reports_Php Java Bridge - Fatal编程技术网

使用JavaBridge、php和Ireport进行报告

使用JavaBridge、php和Ireport进行报告,php,jasper-reports,php-java-bridge,Php,Jasper Reports,Php Java Bridge,我正在使用javabridge,从php导出报告时它工作得非常好。我遵循本网站的说明: 这是以ppt格式导出报告的代码。(这是上述链接的演示) 我需要以任何格式在我的网页中显示报表作为预览,嵌入到我的网站视图中,以便用户在导出之前可以看到它 case 'pptx': $outputPath = realpath(".") . "\\" . "output.pptx"; try { $exporter = new java("net.sf.

我正在使用javabridge,从php导出报告时它工作得非常好。我遵循本网站的说明: 这是以ppt格式导出报告的代码。(这是上述链接的演示)

我需要以任何格式在我的网页中显示报表作为预览,嵌入到我的网站视图中,以便用户在导出之前可以看到它

case 'pptx':
         $outputPath = realpath(".") . "\\" . "output.pptx";
        try {
            $exporter = new java("net.sf.jasperreports.engine.export.ooxml.JRPptxExporter");
            $exporter->setParameter(java("net.sf.jasperreports.engine.JRExporterParameter")->JASPER_PRINT, $jasperPrint);
            $exporter->setParameter(java("net.sf.jasperreports.engine.JRExporterParameter")->OUTPUT_FILE_NAME, $outputPath);
        } catch (JavaException $ex) {
            echo $ex;
        }

        header("Content-type: aapplication/vnd.ms-powerpoint");
        header("Content-Disposition: attachment; filename=output.pptx");
      break;
}

$exporter->exportReport();