Passing array data from PHP to JasperReports (with PHP/JavaBridge)

点点圈 提交于 2019-12-04 15:12:29
Dr Casper Black

Im not sure i understand but if you have array of values such as {id => 1 , name => 'fubar', something => 'blala'. Try this:

$map =  new Java("java.util.HashMap");
foreach ($array as $key=>$value){
    $map->put($key,$value);
}
$Jfm = new Java("net.sf.jasperreports.engine.JasperFillManager");
$this->FillReport = $Jfm->fillReport($this->CompileReport, $map, $this->DbConnect);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!