PHP rest client issue

0

Hi,

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(
    "http://localhost:8080/jasperserver",
    "joeuser",
    "joeuser"
);      
$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?

thanks

 

d.dorkis's picture
Joined: Mar 21 2020 - 1:17am
Last seen: 6 days 4 hours ago

0 Answers:

No answers yet
Feedback