SIMITGROUP / phpjasperxml

This is a php wysiwyg report library
BSD 3-Clause "New" or "Revised" License
44 stars 45 forks source link

problem to PHPJasperXML with oracle #64

Closed moronen closed 4 years ago

moronen commented 4 years ago

I have the following code to execute the report:

include_once('Reportes/CostosAFE/phpjasperxml_0.9d/class/tcpdf/tcpdf.php'); include_once('Reportes/CostosAFE/phpjasperxml_0.9d/class/PHPJasperXML.inc.php'); $host="10.172.244.6"; $user="edmadmin"; $password="fajafaja"; $db_or_dsn_name="(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 10.172.244.6)(PORT = 1524)))(CONNECT_DATA =(SID = orip76)(SERVER = DEDICATED)))"; $PHPJasperXML = new PHPJasperXML(); $PHPJasperXML->load_xml_file("Costos_subReporte_Comentarios.jrxml"); $PHPJasperXML->transferDBtoArray($host,$user,$password,$db_or_dsn_name,$cndriver="odbc"); $PHPJasperXML->outpage("I");

I have read the documentation and I have seen the function transferDBtoArray(), it receives 5 parameters, I am using php 5.6 I want to know if the entire structure is well defined because nothing is executed, the screen is blank. The data in my database are correct.

the report compiles well in Ireport5.6

I want to connect with Oracle, how would I do it? Thanks in advance.

kstan79 commented 4 years ago

you can connect to oracle using pdo or odbc method. I'm feel weird with your odbc string, if you can't connect with 'odbc' then try 'pdo' instead: $cndriver='pdo'; $PHPJasperXML->transferDBtoArray($db_host,$db_user,$db_pass,$dbname,$cndriver); if you wish to know more regarding connection, may refer abstractPHPJasperXML.inc.php, line 107.

Good luck

kstan79 commented 4 years ago

no reply, assume issue closed