java - BIRT: creating custom dataSetRow / using dataSetRow in js -
scenario have report groups mark && customer (string) price - decimal, id int
| mark | [price] | {expresion} | //in price in group of mark
| customer | [id] | |
price has aggregateon mark , aggregatefunction sum
in {expresion} need show rounded value of [price] next rule(script on render) :
if( total.sum(birtmath.round(datasetrow["price"])) != birtmath.round(total.sum(datasetrow["price"])) ) { this.getstyle().color ='$color$' }
datasetrow["price"] have price`s. need in group mark somtink grouped(datasetrow["price"],"mark")
questions : 1: how in javascript function? 2: if not possible , how way ? thank you.
i'd try write javascript function in initialize method of report design. passing parameter "price"
// inizialize function myroundcheck(obj,price) { if( total.sum(birtmath.round(price)) != birtmath.round(total.sum(price)) ) { obj.getstyle().color ='$color$'; } } // on render myroundcheck(this,datasetrow["price"]);
Comments
Post a Comment