I found a lib in Git link that allows PHP to connect to JasperServer (java server ), I already use and it works, but I wanted to add a functionality to this project, it currently only accepts an array of parameters as below:
private function _requestMock($report, $format, $params)
{
if (is_array($params)) {
$reportParams = "";
foreach ($params as $name => $value) {
$reportParams .= "<parameter name=\"$name\"><![CDATA[$value]]></parameter>\n";
}
} else {
$reportParams = '';
}
$xmlTemplate = <<<XML_TEMPLATE
<request operationName="runReport" locale="pt_BR">
<argument name="RUN_OUTPUT_FORMAT">{$format}</argument>
<resourceDescriptor name="" wsType="" uriString="{$report}" isNew="false">
<label>null</label>
{$reportParams}
</resourceDescriptor>
</request>
XML_TEMPLATE;
return $xmlTemplate;
}
What I wanted to do is to pass an array of objects, but I do not know what the ireport file would look like to get an Array of Objects there, I do not even know if that's possible.