1
I found a lib in Git https://github.com/adlermedrado/PHP-JasperServer-Integration that allows PHP to connect with Jasperserver ( java’s ireport server ), I already use and works, but I wanted to add a feature to this project, currently it 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 don’t know how the ireport file would look to receive an Object Array type there, I don’t even know if this is possible
You want to pass an object array to use as a parameter in the sql query?
– durtto
that same, in fact I don’t even need to do the sql query, with these objects I would already fill out the form
– SneepS NinjA