Closed vbspcoder closed 7 years ago
Hi,
Latest version we did tried use pdo but never test it properly, u may use it and feed back.
<?php
include_once '/class/PHPJasperXML.inc.php';
include_once '/class/tcpdf/tcpdf.php';
$PHPJasperXML = new PHPJasperXML("en","TCPDF"); //if export excel, can use PHPJasperXML("en","XLS OR XLSX");
//$PHPJasperXML->debugsql=true;
$PHPJasperXML->arrayParameter = array('para1'=>'1','para2'=>'2');
$PHPJasperXML->load_xml_file('file1.jrxml'); //if xml content is string, then $PHPJasperXML->load_xml_string($templatestr);
//$PHPJasperXML->sql = $sql; //if you wish to overwrite sql inside jrxml
$PHPJasperXML->transferDBtoArray(DBSERVER,DBUSER,DBPASS,DBNAME,"pdo");
$PHPJasperXML->outpage('I'); //$PHPJasperXML->outpage('I=render in browser/D=Download/F=same as file','filename.pdf or filename.xls or filename.xls depends on constructor');
Close ticket due to no reply sometimes
@kstan79 Could you put what version of PHP and what version of iReport do you use?
this phpjasperxml end. use latest method.
How to make $PHPJasperXML->transferDBtoArray to connect to Oracle