re,
UNe expression BSH est du type :
Code:
// This declaration is important. The script-method getValue is called by the
// BSHExpression to evaluate the expression. We override the default implementation
// and perform own calculations here ...
Object getValue()
{
Object value = dataRow.get("VARIANCE");
if (value instanceof Number == false)
{
return Boolean.FALSE;
}
Number number = (Number) value;
if (number.doubleValue() < 0)
{
return Boolean.TRUE;
}
return Boolean.FALSE;
}
Cet exemple est issu du fichier pentaho-solution\samples\dashboard\jsp\embedded_report.xml
Pour plus d'infos sur le langage BSH : http://www.beanshell.org/docs.html
Cédric