Call BI Publisher from PHP to run a report and get a PDF

A question was asked many times to me, how to embed a bi publisher report into JD Edwards. It could be very easy with PHP (or any tools that can call a web service) and you can use it in any applications.

PHP SCRIPT

  • <?php
  • $theme = $_GET[‘theme’];
  • $soustheme = $_GET[‘soustheme’];
  • $lettre = $_GET[‘lettre’];
  • $id = $_GET[‘id’];
  • $wsdl = “https://BIPUBLISHER_SERVER:PORT/xmlpserver/services/ReportService?wsdl“;
  • $client = new SoapClient($wsdl);
  • $params[] = array(‘name’=>’IDENTIFIANT’, ‘value’=>$id, ‘hasMultiValues’=>0);
  • $report = $client->getReportData(‘LETTRETYPE/’ . $theme . ‘/’ . $soustheme . ‘/’ . $lettre . ‘.xdo’,
  • $params,
  • ‘USER’, // ‘Guest’ can be used with a null pwd
  • ‘PASSWORD’,
  • ‘pdf’
  • );
  • header(‘Content-type: application/pdf’);
  • echo $report;
  • ?>


Catégories :BI Publisher

Tags:, ,

Laisser un commentaire

%d blogueurs aiment cette page :