Hello<br />
<br />
I'm trying to implement pagination using PHP/JavaBridge but I'm struggling to find any examples as to how to do it.<br />
<br />
I can see some useful looking methods under iRenderTask in the API - getPageCount(), getPageNumber(), getTotalPage(), setPageNumber() - but I'm failing to get this to work <br />
<br />
Effectively what I want to do is get the number of pages and be able to pass a specific page number to the Report Engine.<br />
<br />
A (much abridged) snippet of my code appears below:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><?php
public function displayReport()
{
$fmt = new java('org.eclipse.birt.report.engine.api.HTMLRenderOption');
$fmt->setOutputFormat('html');
$fmt->setOption('HTML_PAGINATION', true);
$task = self::$_reportEngine->createRunAndRenderTask($this->_rptDesign);
$fmt->setOutputStream($out = new java('java.io.ByteArrayOutputStream'));
$task->setRenderOption($this->_format);
// echo $task->getPageCount(); die; # this returns an exception

$task->run();
$task->close();
return java_values($out->toByteArray());
}
?></pre>
<br />
Could anyone help me here. Is there any example code out there I might be able to look at?<br />
<br />
Thanks