PHP rest client issue


i install succesfully jasperserver on widfly.

i use php rest client for execute report on jasperserver and download in pdf or xls. if i send parameters in controlsinput i receive report with data but if send FIELD in detail the report is always empty.

this is my code for execute and download report

use Jaspersoft\Client\Client;

$client = new Client(
$control = array('SURNAME' => array('XXXXX'), "EVENT" => array("AAAAA", "BBBBBB"));

$report = $client->reportService()->runReport("/reports/oltrarno/test", "pdf", null, null, $control);
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename=report.pdf');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . strlen($report));
header('Content-Type: application/pdf');
echo $report;

i have one parameter called SURNAME and field in detail 1 called EVENT, the surname is ok but the fields event is empty. It's possibile send field in detail from php?



d.dorkis's picture
Joined: Mar 21 2020 - 1:17am
Last seen: 2 years 1 month ago

0 Answers:

No answers yet