SIMITGROUP / phpjasperxml

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

Fatal error: Uncaught Error: Attempt to assign property "sql" on null #73

Closed MuhammadZakhy closed 2 years ago

MuhammadZakhy commented 2 years ago

I'm using php 8.0.6 + MSSQL + jaspersoft Here is my part of simple php code :

<?php
include_once("phpjasperxml-master/PHPJasperXML.inc.php");

$server = "localhost";
$user = "root";
$pass = "";
$db = "db_vmi";

$PHPJasperXML = new PHPJasperXML();
// $PHPJasperXML->debugsql=true;
// $PHPJasperXML->arrayParameter=array("parameter1"=>1);
$PHPJasperXML->load_xml_file("stok.jrxml");

$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db);
$PHPJasperXML->outpage("I");    //page output method I:standard output  D:Download file
?>

Here is my query from jrxml file :

image

Here is the error that i've got :

image image

Please help me to fix this kind of error Thank you very much!

kstan79 commented 2 years ago

hm.. it seems php8.0 of strict control. phpjasperxml is pretty old and no major overhaul for long time. at the mean time you have to fallback to older version like ~php 7.3. There will be more major update which will make it compatible with more recent php

kstan79 commented 2 years ago

this repository closed, use new repository with new code base instead: https://github.com/SIMITGROUP/phplibs

kstan79 commented 2 years ago

finally i decided to put latest code in this repository still, by right latest version support php7.4 and above (only), you may try it.

kstan79 commented 2 years ago

not relavent to latest version anymore