Table des matières
Reports
Reports are specific of a center. For each report add an entry in [QAP10_HOME]/WebContent/local/view/Statistics/Statistics.jsp
<!-- example -->
<h4>Equipments</h4>
<div>
<ul>
<li>
<a href="#" onclick='statistics_Launch({"rptname":"stat/equipAlert"})">future alerts</a>
</li>
<!-- 'my stat' added from there -->
<li>
<a href="#" onclick='statistics_Launch({"rptname":"stat/niceReport"})'>my stat</a>
</li>
<!-- that's it :) -->
</ul>
</div>
Engines
QAP10 uses BIRT report as default report engine. It is possible to add another report engine like a PHP server. To do so, define your settings in [QAP10_HOME]/WebContent/local/view/primus.jsp
$.extend(true, appliParam, {
...
"reportServerURI":
{
// BIRT engine with reports root diretory set to 'lab'
"birt" : "http://[server IP ]:8080/qap10report/preview?__report=lab/",
// another engine (e.g. web server with php)
"php" : "http://[server IP ]/qap10report/"
}
...
});
Reports filename extension are set automatically according to engine name : birt=.ptdesign, php=.php, py=.py … so beware of the engine's name !
Syntax
QAP10 uses a javascript function statistics_Launch() to call a report, with the following arguments in JSON format
- rptname : relative path of the filename or URL call (string)
- paramsStatic : fixed parameters expected by the call (string)
- dialog : call a dialog popup before launching the report (boolean)
- engine : (string)
Calling examples
A plain report. Nothing is said about the report engine, so the BIRT default engine is used.
<a href='#' onclick='statistics_Launch({"rptname": "example1"})'>Example 1</a>
The same statistic in xls format
<a href='#' onclick='statistics_Launch({"rptname": "example1", "paramsStatic": "&__format=xls"})'>Example 1 Excel format</a>
Another BIRT report in sub directory 'quality', and with a popup dialog to setup parameters.
<a href='#' onclick='statistics_Launch({"rptname": "quality/example2", "dialog": true})'>Example 2</a>
Use a 'php' engine.
<a href="#" onclick='statistics_Launch({"rptname":"example2", "engine":"php"})'>Example 3</a>
Of course a direct request is always possible.
<a href="#" onclick='statistics_Launch({"rptname": "http://some.domaine.com"})'>Example 4</a>
